JoeSpy
New Member
- Joined
- Nov 24, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
So, my current code is below. My input in a cell is a company name. The result I want is the following...
ACME Rockets / CA
Once I have selected the cell, I bring up a userform where I select a state abbreviation.
I want to change the number format to accommodate my selection.
My code thus far...which does not yet work...is below. I have a named range that populations ComboBox1 with state abbreviations.
Private Sub CommandButton1_Click()
Dim mystate
mystate = ComboBox1.Value ' this returns a two letter state abbreviation
ActiveCell.NumberFormat = "@ "" / " & mystate
Unload Me
End Sub
HELP!
ACME Rockets / CA
Once I have selected the cell, I bring up a userform where I select a state abbreviation.
I want to change the number format to accommodate my selection.
My code thus far...which does not yet work...is below. I have a named range that populations ComboBox1 with state abbreviations.
Private Sub CommandButton1_Click()
Dim mystate
mystate = ComboBox1.Value ' this returns a two letter state abbreviation
ActiveCell.NumberFormat = "@ "" / " & mystate
Unload Me
End Sub
HELP!