View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales K Dales is offline
external usenet poster
 
Posts: 131
Default Reference message box

The standard method (to allow user input, typed) would be
to use an input box instead of a message box:

RefStr = InputBox("Enter the reference you wish to use:")
Application.Goto Reference:="Submitted,Mar

Or, a better way since it avoids typos would be to create
a userform with a list or combo box with all your
predefined reference names - then in your VBA code call
the Show method of the user form when you need the input.

-----Original Message-----
I have a macro with references that will change month to

month. I want to
setup an input box that will ask the user which reference

(defined name) to
use and will insert it into the macro and have it

continue from there.

What the macro does is copies a number of columns and

pastes them into
another workbook including a column for the amount for

the month. so the
line for february look like this:

Application.Goto Reference:="Submitted,Feb"

In the end, what I want to happen is for a message box to

appear asking
"What month?" or what defined name (which are already set

up for all months)
and the user would type in "Mar" and the line would

change to:

Application.Goto Reference:="Submitted,Mar"

or however else it would do it.


Any suggestions?
Niq


.