Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |