Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default how can a macro be paused for input and then resume executio

In the following macro in excel please answer the italic question
Range("A1").Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Range("A1:G1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Select
Dim x As String
x = InputBox("Put Value", "abc") ' How can the macro be paused here and
after input what
key will resume it ?
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.Select

End Sub
Thanks for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default how can a macro be paused for input and then resume executio

Hi,

Simply displaying an input box in this case pauses you macro waiting for
that input but it isn't immediatly obvious what you are trying to do.Have a
look at my version and post back with what you want to do with the input when
you have it. I've deleted some lines from your code that aren't necessary.

Sub stantially()
Range("A1:G1").Copy
Range("A2").Select
ActiveSheet.Paste
x = InputBox("Put Value", "abc")
ActiveCell.Offset(0, 1).Select
End Sub

Mike
"Khan" wrote:

In the following macro in excel please answer the italic question
Range("A1").Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Range("A1:G1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Select
Dim x As String
x = InputBox("Put Value", "abc") ' How can the macro be paused here and
after input what
key will resume it ?
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.Select

End Sub
Thanks for your help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how can a macro be paused for input and then resume executio

The Macro will pause automatically for the user to key in the value. After
the key enter or Ok the macro will continue.

Subodh
"Khan" wrote in message
...
In the following macro in excel please answer the italic question
Range("A1").Select
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Range("A1:G1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Select
Dim x As String
x = InputBox("Put Value", "abc") ' How can the macro be paused here
and
after input what
key will resume it ?
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.Select

End Sub
Thanks for your help



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
Can a macro be paused to allow input, then continue? Rufushenry Excel Worksheet Functions 2 December 31st 09 07:01 PM
Edit Cells while Macro is Paused at Message Box Magoo Excel Programming 4 February 28th 08 07:10 PM
Pause, print preview, resume macro ToddEZ Excel Programming 4 November 27th 07 06:39 PM
Where is the resume macro on the toolbar? Bju23 Excel Discussion (Misc queries) 1 November 7th 05 08:53 PM
Suspend/resume running of a macro Peter[_20_] Excel Programming 3 February 9th 04 01:49 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"