ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pausing a macro to select a cell (https://www.excelbanter.com/excel-programming/287611-pausing-macro-select-cell.html)

Jim[_38_]

Pausing a macro to select a cell
 
I would like to create a macro the copies data from a
list of named ranges and then do a past values into a
worksheet for trends. That, by itself, is no problem.
However, each month the paste values will be in a new
column (one for each month). Is there a way to pause the
macro so I can click the first cell in the receiving
range differently each month?

Thanks,
Jim

Bob Phillips[_6_]

Pausing a macro to select a cell
 
Jim,

You could do one of two things

Application.InputBox with a type of 8, this will allow the user to select a
cell and its address is returned from the input box

you could use the date to work out which is the appropriate column.

Post back with some specific details if you want more help

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jim" wrote in message
...
I would like to create a macro the copies data from a
list of named ranges and then do a past values into a
worksheet for trends. That, by itself, is no problem.
However, each month the paste values will be in a new
column (one for each month). Is there a way to pause the
macro so I can click the first cell in the receiving
range differently each month?

Thanks,
Jim




Rich J

Pausing a macro to select a cell
 
try putting code in like this at the point where you need a break in the cod

Dim Start as Varian


Start = Time
Do While Timer < Start + 5 ' make the 5 larger if you need more tim
DoEvents ' Yield to other processes
Loo



All times are GMT +1. The time now is 07:48 AM.

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