Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbscript question...
If I want to perform a data base update (i.e. same as hitting "!" in
the UI) from a vbscript what command should I use.... SpreadSheet = "D:\test.xls" ' Create the Excel application object Dim Excel Set Excel = CreateObject ("Excel.Application") Excel.Visible = True Excel.Workbooks.Open SpreadSheet Excel.Refresh <---- This is giving me an error Excel.Workbooks.Close Excel.Quit |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
vbscript question...
This seemed to work ok.
SpreadSheet = "D:\test.xls" Dim Excel dim Wkbk Set Excel = CreateObject ("Excel.Application") Excel.Visible = True set wkbk = Excel.Workbooks.Open (SpreadSheet) wkbk.RefreshAll wkbk.Close true 'save changes??? Excel.Quit set wkbk = nothing set excel = nothing =============== Did you want to save your changes? rosen wrote: If I want to perform a data base update (i.e. same as hitting "!" in the UI) from a vbscript what command should I use.... SpreadSheet = "D:\test.xls" ' Create the Excel application object Dim Excel Set Excel = CreateObject ("Excel.Application") Excel.Visible = True Excel.Workbooks.Open SpreadSheet Excel.Refresh <---- This is giving me an error Excel.Workbooks.Close Excel.Quit -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run VBScript from Excel | Excel Discussion (Misc queries) | |||
Anoth vbscript question ... sorry ! | Setting up and Configuration of Excel | |||
VBscript | Excel Programming | |||
VBscript | Excel Programming | |||
Pastespecial via vbscript not working | Excel Programming |