ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question (https://www.excelbanter.com/excel-programming/302590-question.html)

Daryl Timm

Question
 
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



Harald Staff

Question
 
Hi Daryl

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

HTH. Best wishes Harald

"Daryl Timm" skrev i melding
ink.net...
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





Daryl Timm

Question
 
Thanks Harald,

I appreciate it.
"Harald Staff" wrote in message
...
Hi Daryl

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

HTH. Best wishes Harald

"Daryl Timm" skrev i melding
ink.net...
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








All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com