Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide a workbook before saving
I have given the user a menu option to set the ISADDIN property of my addin
to false. When they choose the option they are able to make changes to a parameter sheet. I want to ensure that the the workbook is still saved as an addin, so I have set ISADDIN back to true in the beforesave event. For some reason though, excel doesn't always do what I want it to do: The beforesave event is triggered, and the property gets changed, but then instead of saving the addin, excel saves the active workbook, which, due to the fact that it's just been hidden, can't be the addin. In the case where the addin is the only open workbook, it gets saved as I want it to. any advice?? Thanks Rob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide a workbook before saving
Use
ThisWorkbook.Save rather than Activeworkbook.Save -- Regards, Tom Ogilvy "Rob" wrote in message ... I have given the user a menu option to set the ISADDIN property of my addin to false. When they choose the option they are able to make changes to a parameter sheet. I want to ensure that the the workbook is still saved as an addin, so I have set ISADDIN back to true in the beforesave event. For some reason though, excel doesn't always do what I want it to do: The beforesave event is triggered, and the property gets changed, but then instead of saving the addin, excel saves the active workbook, which, due to the fact that it's just been hidden, can't be the addin. In the case where the addin is the only open workbook, it gets saved as I want it to. any advice?? Thanks Rob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide a workbook before saving
sorry, should have posted my code. I DID use thisworkbook.save.
Rob "Tom Ogilvy" wrote: Use ThisWorkbook.Save rather than Activeworkbook.Save -- Regards, Tom Ogilvy "Rob" wrote in message ... I have given the user a menu option to set the ISADDIN property of my addin to false. When they choose the option they are able to make changes to a parameter sheet. I want to ensure that the the workbook is still saved as an addin, so I have set ISADDIN back to true in the beforesave event. For some reason though, excel doesn't always do what I want it to do: The beforesave event is triggered, and the property gets changed, but then instead of saving the addin, excel saves the active workbook, which, due to the fact that it's just been hidden, can't be the addin. In the case where the addin is the only open workbook, it gets saved as I want it to. any advice?? Thanks Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook | Excel Discussion (Misc queries) | |||
hide columns when saving csvq | Excel Discussion (Misc queries) | |||
Saving Workbook | Excel Programming | |||
How to hide a workbook and to detect a hidden workbook in visual basic | Excel Programming | |||
Saving a Workbook: Forcing User to Rename before Saving | Excel Programming |