Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook Don Excel Discussion (Misc queries) 0 April 20th 08 04:51 AM
hide columns when saving csvq tshad[_3_] Excel Discussion (Misc queries) 1 April 1st 08 05:45 PM
Saving Workbook VJ Excel Programming 1 November 29th 04 02:47 PM
How to hide a workbook and to detect a hidden workbook in visual basic jn1971[_3_] Excel Programming 0 May 5th 04 10:08 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM


All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"