Macro to remove apostrophes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm running this macro to remove the residual apostrophes following the
export of a access table to Excel. It ran great yesterday, but for some
reason today I'm getting a syntax error at "Dim C As Excel.Range"
something missing?

Sub RemoveApostrophes()
Dim C As Excel.Range
For Each C In Application.Selection.Cells
C.Formula = C.Formula
Next
End Sub
 
Sounds like your References no longer contains a reference to EXCEL library.
Check it out and see if it's marked as Missing or is not selected.
 
Back
Top