Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default disable macro during save-as

I have a macro in ThisWorkbook in a workbook named Template, that will
make sure a column is cleared before the user starts. This, in case
someone saves data in this workbook by accident.

The user will run other macros, and eventually a macro will save this
workbook under a new name based on the date, example NewFile 1-1-07 .
However, if the user brings up this workbook NewFile 1-1-07 again
later, this column will be wiped out via the ThisWorkbook coding.

What I want is to include code within the macros that will disable the
code in ThisWorkbook so that column is not wiped out when it is opened
later.

Thanks,
J.O.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default disable macro during save-as

I dont think you can disable the code when doing a save as What uo could do
instead of save as is to copy to a new book so that the code will not follow
the
workbook. Add or Subract sheets that you need

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy

"excelnut1954" wrote:

I have a macro in ThisWorkbook in a workbook named Template, that will
make sure a column is cleared before the user starts. This, in case
someone saves data in this workbook by accident.

The user will run other macros, and eventually a macro will save this
workbook under a new name based on the date, example NewFile 1-1-07 .
However, if the user brings up this workbook NewFile 1-1-07 again
later, this column will be wiped out via the ThisWorkbook coding.

What I want is to include code within the macros that will disable the
code in ThisWorkbook so that column is not wiped out when it is opened
later.

Thanks,
J.O.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default disable macro during save-as

On May 2, 11:45 am, Mike wrote:
I dont think you can disable the code when doing a save as What uo could do
instead of save as is to copy to a new book so that the code will not follow
the
workbook. Add or Subract sheets that you need

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy



"excelnut1954" wrote:
I have a macro in ThisWorkbook in a workbook named Template, that will
make sure a column is cleared before the user starts. This, in case
someone saves data in this workbook by accident.


The user will run other macros, and eventually a macro will save this
workbook under a new name based on the date, example NewFile 1-1-07 .
However, if the user brings up this workbook NewFile 1-1-07 again
later, this column will be wiped out via the ThisWorkbook coding.


What I want is to include code within the macros that will disable the
code in ThisWorkbook so that column is not wiped out when it is opened
later.


Thanks,
J.O.- Hide quoted text -


- Show quoted text -


Thanks Mike
I wasn't sure if you could have a macro write to a macro, especially
since I have the VB window password protected.
I'll try your method.
If someone else has an idea, I would appreciate it.
Thanks again for your suggestion, Mike.
J.O.

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
Disable Quick Save & Save As L Weber Excel Discussion (Misc queries) 6 October 18th 07 08:57 PM
Disable save & save as then return message... J.W. Aldridge Excel Programming 2 September 15th 06 04:35 PM
disable save and saveas from menubar and save via command button Steve E Excel Programming 5 September 13th 06 11:51 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
Disable File-Save menu item in macro? BrianG[_4_] Excel Programming 1 February 25th 04 06:48 PM


All times are GMT +1. The time now is 12:42 PM.

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

About Us

"It's about Microsoft Excel"