LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Disable Macros on new sheet

Hello, I'm a beginner at using Excel macros, and after much cursing I was
finally able to get two macros to run on the same workbook. The one I'm
having trouble with takes the data from a particular cell and uses it to
rename the file before saving it. The problem is, both macros are still
active when opening that new file. This is for invoices. The initial file
is a blank invoice where I want the macros to run. The secondary file is
saved as the customer's name. I do not want the macros to run on the
secondary file. What can be done to auto-disable the macros on the new file?
(These are both auto-run macros.)

Thanks,
Duane

'invoice number advance
Private Sub Workbook_Open()
Range("m3").Value = Range("m3").Value + 0.1
End Sub

'auto filename change
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisFile = Range("D13").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

 
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 macros? me[_9_] Excel Programming 1 October 28th 05 11:07 PM
Disable macros Otto Moehrbach[_6_] Excel Programming 0 November 18th 04 03:49 PM
How to disable macros? LenB[_2_] Excel Programming 6 October 6th 03 07:54 PM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM
en-/disable macros pop-up James[_10_] Excel Programming 1 July 22nd 03 05:55 PM


All times are GMT +1. The time now is 01:53 AM.

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"