Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
I'm new to macros, and have created them, so far, only through the
"record macro" function. My problem macro performs a "save as" and then (supposedly) closes the sheet. When running the macro I find I need to manually intervene twice, once for the "file exists - overwrite?" dialog, and again for the "save changes to?" dialog. Is there a way, in the macro, for me to respond to these queries? I responded during the "record" but it didn't seem to take. Thanks. JLOB |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
Try setting Application.DisplayAlerts = False before this code, it will then
just continue. Reset afterwards. -- HTH RP (remove nothere from the email address if mailing direct) "John O'Boyle" wrote in message ... I'm new to macros, and have created them, so far, only through the "record macro" function. My problem macro performs a "save as" and then (supposedly) closes the sheet. When running the macro I find I need to manually intervene twice, once for the "file exists - overwrite?" dialog, and again for the "save changes to?" dialog. Is there a way, in the macro, for me to respond to these queries? I responded during the "record" but it didn't seem to take. Thanks. JLOB |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
Do you have an example of how that statement is contructed and where
that statement should go? Do I just add it to my (edited) existing macro? thanks. J. Bob Phillips wrote: Try setting Application.DisplayAlerts = False before this code, it will then just continue. Reset afterwards. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
Sub yourMacro()
Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\myDir\myBook.xls" ' rest of code Application.DisplayAlerts = True End Sub -- HTH RP (remove nothere from the email address if mailing direct) "John O'Boyle" wrote in message ... Do you have an example of how that statement is contructed and where that statement should go? Do I just add it to my (edited) existing macro? thanks. J. Bob Phillips wrote: Try setting Application.DisplayAlerts = False before this code, it will then just continue. Reset afterwards. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
Actually, thank you, I tried it (before I saw this note) with lines #1 &
#4. Everything seems to work as advertised. Do I really need line #2? Thanks. JLOB Bob Phillips wrote: Sub yourMacro() Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\myDir\myBook.xls" ' rest of code Application.DisplayAlerts = True End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro help anyone.....
I put that in as I assumed you had that in your code. line #3 does say ...
rest of code. -- HTH RP (remove nothere from the email address if mailing direct) "John O'Boyle" wrote in message ... Actually, thank you, I tried it (before I saw this note) with lines #1 & #4. Everything seems to work as advertised. Do I really need line #2? Thanks. JLOB Bob Phillips wrote: Sub yourMacro() Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\myDir\myBook.xls" ' rest of code Application.DisplayAlerts = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |