Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Pause to select cell

I have a main spreadsheet that contains a macro that goes to 25 different
spreadsheet and copies information and paste to the main spreadsheet. I
would like to pause the macro after each paste to select the row for the next
spreadsheet. How can I do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Pause to select cell

There is no effective way to pause a macro as you have described it. Macro's
are like fireworks. Once the fuse is lit it executes all the way through.
There are a couple of options...

1. You could use a userform with a refedit control on it that the user will
need to use to fill in the cell selection.

2. You could use an inputbox designed to accept only ranges (probably the
best solution for you).

3. You could use event programming to catch a selection change and use that
to initiate your copy.

Sub test()
Dim lng As Long

For lng = 1 To 3
Application.InputBox("Please select a range.", Type:=8).Select
MsgBox Selection.Address
Next lng
End Sub
--
HTH...

Jim Thomlinson


"Lweiss" wrote:

I have a main spreadsheet that contains a macro that goes to 25 different
spreadsheet and copies information and paste to the main spreadsheet. I
would like to pause the macro after each paste to select the row for the next
spreadsheet. How can I do this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Pause to select cell

here is the macro

Windows("Weekly Modified Work Report Ariss.xls").Activate
Application.Goto Reference:="Data"
Selection.Copy
Windows("Weekly Modified Work Report.xls").Activate
ActiveSheet.Paste

I want to stop the macro here so that I can go to my main spreadsheet
"Weekly Modified Work Report" to select the cell to run the next macro:

Windows("Weekly Modified Work Report Camtac.xls").Activate
Application.Goto Reference:="Data"
Selection.Copy
Windows("Weekly Modified Work Report.xls").Activate
ActiveSheet.Paste

and so on for 20 spreadsheets.

What is the best way to do this?

"Lweiss" wrote:

I have a main spreadsheet that contains a macro that goes to 25 different
spreadsheet and copies information and paste to the main spreadsheet. I
would like to pause the macro after each paste to select the row for the next
spreadsheet. How can I do this?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Pause to select cell

How about this...

Sub test()

Workbooks("Weekly Modified Work Report Ariss.xls").Names("Data"). _
RefersToRange.Copy Destination:= _
Application.InputBox("Please select a range.", Type:=8)

Workbooks("Weekly Modified Work Report Camtac.xls").Names("Data"). _
RefersToRange.Copy Destination:= _
Application.InputBox("Please select a range.", Type:=8)

End Sub
--
HTH...

Jim Thomlinson


"Lweiss" wrote:

here is the macro

Windows("Weekly Modified Work Report Ariss.xls").Activate
Application.Goto Reference:="Data"
Selection.Copy
Windows("Weekly Modified Work Report.xls").Activate
ActiveSheet.Paste

I want to stop the macro here so that I can go to my main spreadsheet
"Weekly Modified Work Report" to select the cell to run the next macro:

Windows("Weekly Modified Work Report Camtac.xls").Activate
Application.Goto Reference:="Data"
Selection.Copy
Windows("Weekly Modified Work Report.xls").Activate
ActiveSheet.Paste

and so on for 20 spreadsheets.

What is the best way to do this?

"Lweiss" wrote:

I have a main spreadsheet that contains a macro that goes to 25 different
spreadsheet and copies information and paste to the main spreadsheet. I
would like to pause the macro after each paste to select the row for the next
spreadsheet. How can I do this?

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 Pause for selecting cell jo2109 Excel Discussion (Misc queries) 3 June 4th 09 02:05 AM
Select sheet, Pause till Enter pressed, return to previous sheet Russ3Z Excel Programming 1 June 12th 07 11:06 PM
create a pause in print macro to allow user to select printer Scott53 Excel Programming 1 September 7th 05 04:29 PM
How do I pause a macro to select specific cells lee Excel Worksheet Functions 1 April 2nd 05 02:11 PM
Pause Macro to enter data in cell Frank Kabel Excel Programming 4 May 30th 04 10:56 PM


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