#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Save As

I expect you are talking about Event macros
http://www.mvps.org/dmcritchie/excel/event.htm

If you have things happening when you save the file, would look
in ThisWorkBook.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"angiede" wrote in message ...
I have an Excel file with macros that seems to work fine. However, when I hit File-Save As - it runs through all the macros again

and replaces text and changes that have been made to the file. How do I keep macros from running when I exit?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save As

I'm really new to VB. I'm attaching the code I'm using. I tried a few suggestions from your link - but I don't think I'm really getting it. Can you take a look and let me know? I'm just trying to prevent the code from running again when I go to file save as. If I just hit save - it's fine. But File Save as - runs the code again everytime

Thanks for your help

Private Sub ComboBox1_Change(
Checkcell = "B1
Range(Checkcell).Selec
ActiveCell.FormulaR1C1 = ComboBox1.Valu

Range(Checkcell).Selec
ActiveCell.Offset(5, 0).Range("A1").Selec
If Range(Checkcell).Value2 = "Brand" The
ActiveCell.Value = "Please enter pre and post time periods. The time periods must be of equal length
Els
If Range(Checkcell).Value2 = "Brand1" The
ActiveCell.Value = "Please enter two time periods - note that they don't need to be the same length
Els
If Range(Checkcell).Value2 = "Trial & Repeat" The
ActiveCell.Value = "Please be sure to indicate whether this is a one-time delivery or ongoing
Els
ActiveCell.Value = "
End I
End I
End I

Range(Checkcell).Selec
ActiveCell.Offset(9, 4).Range("A1").Selec
If Range(Checkcell).Value2 = "Crosstab" The
Call PopulateCrosstabMeasures(Checkcell
Els
If Range(Checkcell).Value2 = "Distribution" The
Call DeleteMeasures(Checkcell
Call PopulateDistributionMeasures(Checkcell
Els
Call DeleteMeasures(Checkcell
End I
End I
Range(Checkcell).Selec
ActiveCell.Offset(4, 0).Range("A1").Selec

End Su

----- David McRitchie wrote: ----

I expect you are talking about Event macro
http://www.mvps.org/dmcritchie/excel/event.ht

If you have things happening when you save the file, would loo
in ThisWorkBook
--
HTH
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.ht
Search Page: http://www.mvps.org/dmcritchie/excel/search.ht

"angiede" wrote in message ..
I have an Excel file with macros that seems to work fine. However, when I hit File-Save As - it runs through all the macros agai

and replaces text and changes that have been made to the file. How do I keep macros from running when I exit



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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
Save As and save current numbers not the actual formulas and links Frank Menard Excel Discussion (Misc queries) 2 November 9th 06 09:18 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 07:52 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"