Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Question
I am not very knowledgeable about VBA code so here is my
question. I am trying to update an Excel file from a command button. I am using the following code: Set objXL = CreateObject("Excel.Application") objXL.Visible = True objXL.Workbooks.Open ("file") The spreadsheet asks me if I want to update. I would like to respond "yes", then save and exit the file all without clicking a button. How would I finish this code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Question
Mikk
Try Set objxl = CreateObject("Excel.Application") objxl.Visible = True objxl.Workbooks.Open FileName:="file", updatelinks:=True 'open file and update the links objxl.Workbooks("aab.xls").Close savechanges:=True 'save the updated file objxl.Application.Quit 'close the excel application Tony ----- Mikk wrote: ----- I am not very knowledgeable about VBA code so here is my question. I am trying to update an Excel file from a command button. I am using the following code: Set objXL = CreateObject("Excel.Application") objXL.Visible = True objXL.Workbooks.Open ("file") The spreadsheet asks me if I want to update. I would like to respond "yes", then save and exit the file all without clicking a button. How would I finish this code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code question | Excel Discussion (Misc queries) | |||
VBA code question | Excel Discussion (Misc queries) | |||
code question | Excel Discussion (Misc queries) | |||
vb code question | Excel Discussion (Misc queries) | |||
VB Code Question | Excel Discussion (Misc queries) |