input msgbox

detlion1643

Board Regular
Joined
Nov 25, 2009
Messages
164
i have some code as follows

Code:
dim strcat as string
dim strbrand as string

strbrand = ***
strcat = ***

i am trying to find a way to popup a box that a user can input a string for strbrand and hit enter, then another popup box that a user can input a string for strcat and hit enter.

my whole sub uses these inputs for everything, and right now, i change the input in the code itself for testing and it's getting tedious lol.
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Domski

Well-known Member
Joined
Jan 18, 2005
Messages
7,292
Code:
Dim strcat As String
Dim strbrand As String
strbrand = InputBox("Enter first value")
strcat = InputBox("Enter second value")

Dom
 

bertie

Well-known Member
Joined
Jun 12, 2009
Messages
1,869
You are looking for an InputBox.

strbrand = InputBox("Please enter....")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,316
Members
414,053
Latest member
Dual Showman

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
Top