Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Userform comobox equal to first 3 digits in a cell

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.

???

--
Thanks
Shawn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Userform comobox equal to first 3 digits in a cell

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)

"Shawn" wrote:

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.

???

--
Thanks
Shawn

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Userform comobox equal to first 3 digits in a cell

Number wasn't spelled correctly and I would have been scratching my head over
that for a bit.
--
Thanks
Shawn


"Joel" wrote:

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)

"Shawn" wrote:

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.

???

--
Thanks
Shawn

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default Userform comobox equal to first 3 digits in a cell

So what is wrong with this?

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

--
Thanks
Shawn


"Joel" wrote:

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)

"Shawn" wrote:

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.

???

--
Thanks
Shawn

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Userform comobox equal to first 3 digits in a cell

So what is wrong with this?

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


The extra "S" you added to WSCal?

Rick
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how Sum if left (3 digits) are the equal to a field? ldiaz Excel Discussion (Misc queries) 0 September 25th 08 01:18 AM
If number in cell does not equal 6 digits, add zeros to the left kza40381 Excel Discussion (Misc queries) 2 July 9th 08 05:13 PM
Digits after the comma in Userform Gert-Jan Excel Programming 3 July 4th 06 01:49 PM
comobox afdmello Excel Discussion (Misc queries) 2 November 26th 05 07:07 PM
macro & comobox pandino Excel Programming 1 October 28th 03 06:31 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"