Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA: Calling a procedure to run

Status
Not open for further replies.
Dec 18, 2002
1
US
I have written some code which prompts the user for the name of a procedure within an access database. I then want it to run the code which the user has input. Visual basic doesnt like this, anyone got any ideas?

Example:

Message box to user "Which procedure to you want to run?"

VBA then calls that procedure to run.
 
I suggest you look at the inputbox verses the msgbox. You can do something like this

dim strmsg as string

strmsg = inputbox("select procedure A,B,C")

select case strmsg
case "A"
do this
case "B"
do this
case "C"
do this
case else
msgbox "not one of the selections"
end select

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top