Userform comobox equal to first 3 digits in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A cell in a sheet contanins a 10 digit phone number -
WSCal.Range("Phone_Number")

I have a userform with two combo boxes and a text box.

I want the first combo box to load with the first 3 digits from
WSCal.Range("Phone_Number")

This don't work: .cmbxPhoneArea.Value = Left("WSCal.Range("Phone_Numer")", 3)


Then second combo box should load with the 4th 5th and 6th digits

And the textbox should load with the last 4 digits.

???
 
The problem is the cell reference
"WSCal.Range("Phone_Numer")"
You don't need the double quotes. Is "NUMBER" spelled correctly? You should
also add value because a range may be multiple cells.

..cmbxPhoneArea.Value = Left(WSCal.Range("Phone_Numer").value, 3)
 
Number wasn't spelled correctly and I would have been scratching my head over
that for a bit.
 
So what is wrong with this?

.cmbxPhonePre.Value = Mid(WSSCal.Range("Phone_Number").Value, 4, 3)
 
Back
Top