Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pause macro for user cell address input
Say I write a VB macro to copy and paste some data. But
each time I need to paste the data in a slightly different location. I would like the macro to pause for me to select a target cell and then press [enter](or do the same with a mouse), at which point the macro would continue running. Thanks, Ed P.S. I think this was a question mark surrounded by brackets {?} in Lotus 123. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pause macro for user cell address input
Ed
Found this using Google Search (don't know what version you are using but this might help) (later versions of Excel support modeless forms for selecting) However, Stephen Bullen has developed code that allows you to have modeless userforms in Excel 97. Download FormFun.xls from his site: http://www.bmsltd.co.uk/Excel/Default.htm -- sb "Ed Haslam" wrote in message ... Say I write a VB macro to copy and paste some data. But each time I need to paste the data in a slightly different location. I would like the macro to pause for me to select a target cell and then press [enter](or do the same with a mouse), at which point the macro would continue running. Thanks, Ed P.S. I think this was a question mark surrounded by brackets {?} in Lotus 123. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pause macro for user cell address input
Ed,
Use Application.InputBox with a Type value of 8. This will allow the user to select a range. E.g., Dim Rng As Range On Error Resume Next Set Rng = Application.InputBox(prompt:="Choose A Range", Type:=8) If Rng Is Nothing Then ' user didn't select anything Else MsgBox "You selected " & Rng.Address End If -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Ed Haslam" wrote in message ... Say I write a VB macro to copy and paste some data. But each time I need to paste the data in a slightly different location. I would like the macro to pause for me to select a target cell and then press [enter](or do the same with a mouse), at which point the macro would continue running. Thanks, Ed P.S. I think this was a question mark surrounded by brackets {?} in Lotus 123. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Macro: Pause & ask user: "Are you sure you want to continue? | Excel Discussion (Misc queries) | |||
PAUSE EXCEL MACRO FOR INPUT OF DATA VARIABLE | Excel Discussion (Misc queries) | |||
Can you pause a macro in excel to input data and continue? | Excel Discussion (Misc queries) | |||
Macro to pause for user input in dialog box | Excel Discussion (Misc queries) | |||
Macro to move to specified cells, pause for input at each? | Excel Discussion (Misc queries) |