Hello,
I have a VBA script in Excel that prompts the user for input and based off that input it will perform a specific function.
The issue is my team all uses a different input (plus they forget specifics) so I want to create and use an array so that anything they input will match something in the array.
Here is the code:
Code:
Sub Test_Variable_Array()
' This is my array - not sure if this is even correct :(
Dim Customer(2) As String
Customer(0) = "Customer"
Customer(1) = "customer"
Customer(2) = "cust"
InputMsg = "Which view would you like to use"
InputTitle = "Filter View"
DefaultText = "Management"
SpreadsheetTitle = InputBox(InputMsg, InputTitle, DefaultText)
ActiveCell.FormulaR1C1 = "Management"
If SpreadsheetTitle = Customer Then
msgbox ("Match Found")
Else
msgbox ("No Match found")
End If
Thanks!!