Create a Popup box

  • Thread starter Thread starter Darius
  • Start date Start date
D

Darius

I have a created a macro that selects specific records based on th
criteria
in a cell. I would like to link that cell to a pop up box and have th
box
popup when I click on a toolbar command. I created the toolbar but
don't
know how to write the macro that would have a box that is linked to th
cell
on the worksheet and after the user enters the criteria in the cell t
run
the macro based on the link to the popup box. I would like for the th
user
to enter the criteria in the pop up box, that criteria populates a cel
in
the worksheet and the macro runs from there. I believe Tom gave me th
code
but I must have copied it wrong. Please help!!
 
Step 1: Click a button to show a box
Step 2: User enters data into box
Step 3: User's data from box is entered to a cell on the sprdsht
Step 4: Another macro processes the information in that cell

Is that correct? If yes, then this code could do it for you. Note
that some lines have an apostrophe, which is a user note (the compiler
ignores everything on the line after the apostrophe).

Sub Get_User_Input()
Dim Response

Response = InputBox("Please enter data:") 'get user input
Range("a10").Value = Response 'apply that input to a cell: change this
from a10 to your cell address
MyMacro 'call the other macro: change "MyMacro" to the actual name of
the macro that should run
End Sub
 

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

Back
Top