#1
|
|||
|
|||
Taking input from InputBox from user
Hello Everyone!
I want to take the text inputted from the user from the InputBox below and use that text as something to call on in the following IF statement. The IF statement part of the code will filter different items depending on what the user inputs. I can provide that code if it helps give a better idea what I am trying to achieve. (Forgive me if my post is incomplete/missing data/erroneous as I am very tired) Code:
Sub wtf() BeginRow = 1 EndRow = 120 CUSTOMER = 18 InputMsg = "Which view would you like to use" InputTitle = "Filter View" DefaultText = "Management" SpreadsheetTitle = InputBox(InputMsg, InputTitle, DefaultText) ActiveCell.FormulaR1C1 = "Management" msgbox (SpreadsheetTitle) If SpreadsheetTitle = "CUSTOMER" Then msgbox ("CUSTOMERZOR") Else msgbox ("Not CUSTOMER") End If End Sub Cheers! |
#2
|
|||
|
|||
Figured out the issue myself.
The variable Code:
SpreadsheetTitle |
Tags |
filtering, input text, variables |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
vba: user input named argument | andrew12345 | Excel Programming | 2 | 11-18-2014 08:18 AM |
User input to a variable on the document | dsm1995gst | Word VBA | 1 | 09-03-2013 03:43 PM |
Replacing text with user input.?.?.? | brad1977 | Word | 3 | 11-20-2012 10:20 AM |
Restricting User Input on a TextBox (and setting focus) | joatmon | Excel Programming | 1 | 06-05-2012 03:01 PM |
Look up an array based on user input | johnsmb | Excel | 2 | 01-07-2011 01:12 PM |