G
Guest
I am starting a new thread which was based on a sub part of a previous topic
'Open an Excel File from Access' as the focus has changed.
Essentially want to run a macro on some data in an excel file. When the
macro is in excel it works. From Access it tells me that User-Defined type is
not defined.
Any help appreciated.
Bruce
Sub AddApostrophes()
Dim C As Excel.Range
Application.ScreenUpdating = False
myRange = "C2:C" & endrow
With ActiveWorkbook.ActiveSheet
For Each C In Range(myRange)
C.Formula = "'" & C.Formula
Next
End With
Application.ScreenUpdating = True
End Sub
Function endrow()
endrow = (Range("A1").End(xlDown).Row)
End Function
'Open an Excel File from Access' as the focus has changed.
Essentially want to run a macro on some data in an excel file. When the
macro is in excel it works. From Access it tells me that User-Defined type is
not defined.
Any help appreciated.
Bruce
Sub AddApostrophes()
Dim C As Excel.Range
Application.ScreenUpdating = False
myRange = "C2:C" & endrow
With ActiveWorkbook.ActiveSheet
For Each C In Range(myRange)
C.Formula = "'" & C.Formula
Next
End With
Application.ScreenUpdating = True
End Sub
Function endrow()
endrow = (Range("A1").End(xlDown).Row)
End Function