I have managed to open excel through VB 6, managed to select cells. Now I need to save it!! When I try to do it, it comes up with the save changes box. Can I automatically set this to yes?
Nick
Printable View
I have managed to open excel through VB 6, managed to select cells. Now I need to save it!! When I try to do it, it comes up with the save changes box. Can I automatically set this to yes?
Nick
Application.DisplayAlerts = False
application.saveworkbook come up with an error saying you can't save it under the same name as it was opened!!!!
can anyone help????
Hi nswan !!!
to save a already saved workbook use
to save a new oneCode:objExcel.workbooks("myworkbook").save
-cu TheOnlyCode:'avoid any still exist message and filesavas
popups
objexcel.displayalerts = false
'save the workbook
objExcel.workbooks("myworkbook").saveas "c:\temp\hugo.xls"
i'll love you forever. just when i had given up all hope as well!
Thanks
Nick
Code:Application.SaveChanges = True
OR IF YOU WANNA CLOSE IT AFTER SAVING IT THEN
Code:
ActiveWindow.Close savechanges:=True
activewindow.close(1)