Hello,
I would like to call a macro that is currenlty located in Excel file called 'T2C_MODEL.xls'.
The macro name is 'IMPORT_and_FLAG_DATA()' i have received some similar advice before in Thread707-944710, but i'm not sure which bits should actually reference the filepath of the spreadsheet.
My current access module is as follows, but this doesn't work at all:
I hope someone knows how to do this as this would help out loads??
OOch
I would like to call a macro that is currenlty located in Excel file called 'T2C_MODEL.xls'.
The macro name is 'IMPORT_and_FLAG_DATA()' i have received some similar advice before in Thread707-944710, but i'm not sure which bits should actually reference the filepath of the spreadsheet.
My current access module is as follows, but this doesn't work at all:
Code:
Option Explicit
Dim T2C As New Excel.Application
Dim T2C As Object
Dim sourcefilepath As String
Sub T2C_Flat_Import()
Set T2C = New Excel.Application
sourcefilepath = "D:\02-EXCEL_DOCs\T2C_MODEL.xls"
Set T2C = Workbooks.Open(Filename:=sourcefilepath) '
T2C.Run ("IMPORT_and_FLAG_DATA")
T2C.Close
End Sub
I hope someone knows how to do this as this would help out loads??
OOch