PC Review


Reply
Thread Tools Rate Thread

how to avoid user to save in .xlsx

 
 
Mathieu936
Guest
Posts: n/a
 
      26th Jul 2010
Hi!

I have an add-in (.xlam) which copies a worksheet (which contains a
Sub worksheet_calculate) in the current workbook.

However, if the current workbook is an .xlsx format, and the user
still saves in .xlsx format (regardless the message box saying that
the macro will be deleted), the new inserted worksheet will lost its
Sub worksheet_calculate.

I really need to keep the Sub worksheet_calculate.

Is there any code/fonction/way to avoid that the used save in .xlsx?
The current workbook can be an existing file with .xlsx format, or a
new freshly created workbook.

Thanks!
 
Reply With Quote
 
 
 
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      27th Jul 2010
On Jul 26, 1:06*pm, Mathieu936 <mathieu...@gmail.com> wrote:
> Hi!
>
> I have an add-in (.xlam) which copies a worksheet (which contains a
> Sub worksheet_calculate) in the current workbook.
>
> However, if the current workbook is an .xlsx format, and the user
> still saves in .xlsx format (regardless the message box saying that
> the macro will be deleted), the new inserted worksheet will lost its
> Sub worksheet_calculate.
>
> I really need to keep the Sub worksheet_calculate.
>
> Is there any code/fonction/way to avoid that the used save in .xlsx?
> The current workbook can be an existing file with .xlsx format, or a
> new freshly created workbook.
>
> Thanks!


Look in the ThisWorkbook module for before save and stop it within
that.
 
Reply With Quote
 
Mathieu936
Guest
Posts: n/a
 
      27th Jul 2010
On 26 juil, 20:03, Don Guillett Excel MVP <dguille...@austin.rr.com>
wrote:
>
> Look in the ThisWorkbook module for before save and stop it within
> that.- Masquer le texte des messages précédents -


I tried it but the BeforeSave event happens before saving. So I could
popup a message box saying to not save in .xlsx, but after user could
save in .xlsx which is bad.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want Macro to save to .xlsx John Yab Microsoft Excel Programming 2 21st Nov 2009 12:24 AM
save xlsx files Kim Carlsen Microsoft Excel Programming 1 12th Jun 2009 04:41 PM
Unable to save XLSX files without using 'Save As' and different na SlackerBoy Microsoft Excel Setup 1 14th Mar 2009 09:14 PM
Save Workbook As .xlsx to Remove Macros? char507 Microsoft Excel Programming 2 11th Dec 2008 09:23 PM
How to avoid user save file to C drive hunter Windows XP General 1 8th Mar 2006 07:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:06 PM.