Question

D

Daryl Timm

How would I go about writing VBA code that will ask for the user to input
number that the macro will then search for?

I will be using this macro to look for promotion numbers that change
quarterly and I would like to be able to have a message box pop up asking
for the promo number. After I enter the promo number, the macro would
search for the number I entered.

Thank You.

Daryl Timm
 
H

Harald Staff

Hi Daryl

Sub Test()
Cells.Find(What:=InputBox("Now what"), _
LookIn:=xlFormulas, _
LookAt:=xlWhole).Activate
End Sub

HTH. Best wishes Harald
 
D

Daryl Timm

Thanks Harald,

I appreciate it.
Harald Staff said:
Hi Daryl

Sub Test()
Cells.Find(What:=InputBox("Now what"), _
LookIn:=xlFormulas, _
LookAt:=xlWhole).Activate
End Sub

HTH. Best wishes Harald
 
Top