Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Charles Chickering wrote: I don't have vb6 so I guessing a little bit here. I would guess that because the excel object is not visible there is no "ActiveWorkbook" try dimming a workbook object then set that to your open statement: Dim ExcelWorkbook As Excel.Workbook 'Not sure of exact syntax Set ExcelWorkbook = ExcelObj.Workbooks.Open 'fill in rest from your code 'Do formatting ExcelWorkbook.Save Let me know if that works. -- Charles Chickering "A good example is twice the value of good advice." " wrote: Didn't work...i need to add to files..the original excel file (psExcelFName) and the vba script(psXLAFName) and you can't add 2 files to a single workbook only to a workbookS object...so i tried below and still didn't work. Other ideas? With ExcelObj .DisplayAlerts = False .Visible = False .Workbooks.Open FileName:=psExcelFName, ReadOnly:=False, Password:="", IgnoreReadOnlyRecommended:=True .Workbooks.Add psXLAFName .Run ("FormatReportScript") .WorkBooks(1).Save .WorkBooks(1).Close .Quit End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shared workbook - to save or not to save | Excel Discussion (Misc queries) | |||
"Save" macro problem, still prompted to save when closing workbook (?) | Excel Programming | |||
Disable save, save as, but allow save via command button | Excel Programming | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming |