abesimpson
05-06-2008, 09:43 AM
I have a spreadsheet which is linked to an Access table (Data/Data Import). The permissions are set to have the data update when the spreadsheet opens. This works when the spreadsheet is opened from Excel (File/Open) or when the spreadsheet file is opened.
I have a problem when I call the spreadsheet from a vbscript:Set xlobj = CreateObject("Excel.application")
xlobj.visible = True
xlobj.workbooks.open "C:\name of file.xls"
xlobj.Run "Start"
Sub Start()
Application.OnTime Now () + TimeValue("00:00:30"), "SaveExit"
End Sub
Sub SaveExit()
Activeworkbook.Save
Application.Quit
End Sub In this case the spreadsheet opens, the macros execute (yes I know this is clumsy code, it is just for example), but the data-link update is ignored.
I know it's me, what am I doing wrong?
Thanks in advance
a
I have a problem when I call the spreadsheet from a vbscript:Set xlobj = CreateObject("Excel.application")
xlobj.visible = True
xlobj.workbooks.open "C:\name of file.xls"
xlobj.Run "Start"
Sub Start()
Application.OnTime Now () + TimeValue("00:00:30"), "SaveExit"
End Sub
Sub SaveExit()
Activeworkbook.Save
Application.Quit
End Sub In this case the spreadsheet opens, the macros execute (yes I know this is clumsy code, it is just for example), but the data-link update is ignored.
I know it's me, what am I doing wrong?
Thanks in advance
a