Multiple inputbox

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Is it possible to have 2 inputbox to get 2 lots of info. One to ask for week no: and the other to ask period /YTD.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Code:
Dim WeekNo as Long
Dim PerYtd as String

WeekNo = Application.InputBox("Enter a week number", type:=1)
If WeekNo <= 0 Then Exit Sub: Rem canceled

Do 
    PerYtd = Application.InputBox("Enter PERIOD or YTD", type:=2)
    If PerYtd = "False" Then Exit Sub: Rem canceled
    PerYtd = LCase(PerYtd)
Loop Unil PerYtd = "period" or PerYtd = "ytd"
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,877
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top