ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is there a way of pausing a macro (https://www.excelbanter.com/excel-discussion-misc-queries/134529-there-way-pausing-macro.html)

Shazza

Is there a way of pausing a macro
 
Hi i am trying to record a macro to create a new worksheet and then save it
as the title of that worksheet but i cant get the macro to pause or wait for
me to enter in the file name and it just keeps trying to give the sheet the
same name that i saved it to when i was recording it. Is there a way of
getting it to pause so thta i can enter in the file name before it continues
with the rest of its instructions
--
Thank you for reading my post. Hopefully you can answer my querie

joel

Is there a way of pausing a macro
 
Add test code to your macro

1) Use an Inputbox so you can type in information
2) add a statement line Myfilename = "c:\temp\testfile.txt"
3) Write test code that writes too cells on the spreadsheet
Range("A3") = "Test Data"


"Shazza" wrote:

Hi i am trying to record a macro to create a new worksheet and then save it
as the title of that worksheet but i cant get the macro to pause or wait for
me to enter in the file name and it just keeps trying to give the sheet the
same name that i saved it to when i was recording it. Is there a way of
getting it to pause so thta i can enter in the file name before it continues
with the rest of its instructions
--
Thank you for reading my post. Hopefully you can answer my querie


JE McGimpsey

Is there a way of pausing a macro
 
Take a look at the GetSaveAsFileName method in VBA Help.

In article ,
Shazza wrote:

Hi i am trying to record a macro to create a new worksheet and then save it
as the title of that worksheet but i cant get the macro to pause or wait for
me to enter in the file name and it just keeps trying to give the sheet the
same name that i saved it to when i was recording it. Is there a way of
getting it to pause so thta i can enter in the file name before it continues
with the rest of its instructions



All times are GMT +1. The time now is 09:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com