How to pause a macro to allow user to select cell

R

Ron Berns

I am learning to do Macros in Excel and I am unable to figure this problem out.
I am using Excel 2003.

I have two spreadsheets in the same workbook. One is named Working the other is Existing.
I would like to create a macro that allows the user to copy a row from the Existing sheet to the Working sheet. I don't have a problem copying information from one sheet to another. The problem I have is allowing the user to look through the information
in the Existing sheet, select a cell and then have the macro continue.
I was thinking about a list, for selection, but the Existing spreadsheet has many columns that user needs to look through to find the correct row.

Thank You in advance.

Ron
 
J

Jim Cone

Use Application.InputBox - this can return the range selected by the user.
There is also an InputBox function (no application prefix) that returns a string.

Check out VBA help (InputBox) for the details.
--
Jim Cone
Portland, Oregon USA



"Ron Berns" <[email protected]>
wrote in message
I am learning to do Macros in Excel and I am unable to figure this problem out.
I am using Excel 2003.

I have two spreadsheets in the same workbook.
One is named Working the other is Existing.
I would like to create a macro that allows the user to
copy a row from the Existing sheet to the Working sheet.
I don't have a problem copying information from one sheet to another.
The problem I have is allowing the user to look through the information
in the Existing sheet, select a cell and then have the macro continue.
I was thinking about a list, for selection, but the Existing spreadsheet
has many columns that user needs to look through to find the correct row.
Thank You in advance.
Ron
 
D

Dave Peterson

Another way to do it is to tell them that you're going to copy the row with the
activecell to the other sheet.

Ask if they want to continue with the current selection at the beginning of your
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top