Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working on a macro that will place an object at the cursor position on
the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can not really pause or suspend a macro. What you can do is to execute
everything up to where you require the users input as one macro and then using the Sheet Change event initiate another batch of code when the user has completed their input... so you need 2 macros. One before and one after the user input. -- HTH... Jim Thomlinson "jayklmno" wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'some code then when ready for user to select a cell
Set mycell = Application.InputBox( _ Prompt:="Select the Destination Cell", _ Title:="Pick a cell", Type:=8) 'more code Gord Dibben MS Excel MVP On Thu, 28 Jun 2007 11:36:01 -0700, jayklmno wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe I didn't explain it well enough... here's what I'm trying to do... I
have a two tabbed Excel spreadsheet, on one tab is a map of the US. On the other tab I have sales information by state. In another cell on the same tab, I have a round circle that displays three different colors if the sales in that state are below/on average/or above sales plan. When the macro starts I want to prompt the User to select the first state on the map with the cursor, at the location of the cursor I want a text box to be drawn showing the sales data from the other tab and the move on to the next state. The states is just an example, it's more complicated than that, but you get he idea. Any suggestions what to use to to know when the user is ready to draw the text box? "jayklmno" wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How are you determining which state from the map was clicked ?
NickHK "jayklmno" wrote in message ... Maybe I didn't explain it well enough... here's what I'm trying to do... I have a two tabbed Excel spreadsheet, on one tab is a map of the US. On the other tab I have sales information by state. In another cell on the same tab, I have a round circle that displays three different colors if the sales in that state are below/on average/or above sales plan. When the macro starts I want to prompt the User to select the first state on the map with the cursor, at the location of the cursor I want a text box to be drawn showing the sales data from the other tab and the move on to the next state. The states is just an example, it's more complicated than that, but you get he idea. Any suggestions what to use to to know when the user is ready to draw the text box? "jayklmno" wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The location of the cursor on the screen.
"NickHK" wrote: How are you determining which state from the map was clicked ? NickHK "jayklmno" wrote in message ... Maybe I didn't explain it well enough... here's what I'm trying to do... I have a two tabbed Excel spreadsheet, on one tab is a map of the US. On the other tab I have sales information by state. In another cell on the same tab, I have a round circle that displays three different colors if the sales in that state are below/on average/or above sales plan. When the macro starts I want to prompt the User to select the first state on the map with the cursor, at the location of the cursor I want a text box to be drawn showing the sales data from the other tab and the move on to the next state. The states is just an example, it's more complicated than that, but you get he idea. Any suggestions what to use to to know when the user is ready to draw the text box? "jayklmno" wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assign a macro to the picture that runs the processing code.
NickHK "jayklmno" wrote in message ... The location of the cursor on the screen. "NickHK" wrote: How are you determining which state from the map was clicked ? NickHK "jayklmno" wrote in message ... Maybe I didn't explain it well enough... here's what I'm trying to do... I have a two tabbed Excel spreadsheet, on one tab is a map of the US. On the other tab I have sales information by state. In another cell on the same tab, I have a round circle that displays three different colors if the sales in that state are below/on average/or above sales plan. When the macro starts I want to prompt the User to select the first state on the map with the cursor, at the location of the cursor I want a text box to be drawn showing the sales data from the other tab and the move on to the next state. The states is just an example, it's more complicated than that, but you get he idea. Any suggestions what to use to to know when the user is ready to draw the text box? "jayklmno" wrote: I am working on a macro that will place an object at the cursor position on the excel sheet. I need to find a way to pause te loop until a click or keystroke and then continue with the macro. I have dabbled with onkey and sendkeys but can't seem to getthe macro to stop until the user place sthe curor and is ready to move on. Any help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pausing a macro to input cell contents | New Users to Excel | |||
Pausing macro for user Excel input | Excel Programming | |||
Pausing macro for user Excel input | Excel Programming | |||
Pausing macro for user Excel input | Excel Programming | |||
Pausing a macro for user input | Excel Programming |