Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


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