Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default userform combobox treating numbers as text


hello

I have created a task planner userform with comboboxes as selectors fo
week numbers. I have set the condition that the target completion wee
combobox value must be greater than the start date combobox - howeve
the combobox is treating the week numbers as text and therefore wee
*1*2 is saying it is smaller than week 8 - I would assume that I woul
have to set the format of the comboboxes in Userform Initialise sub t
number format - can anyone tell me how I would do this

--
apnda
-----------------------------------------------------------------------
apndas's Profile: http://www.excelforum.com/member.php...fo&userid=3613
View this thread: http://www.excelforum.com/showthread.php?threadid=56226

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default userform combobox treating numbers as text

All values in combo/list/text boxes are text.
If you require numerical comparison, coerce to numbers first:
If CLng(cboStartWeek.Value) ....

NickHK

"apndas" wrote in
message ...

hello

I have created a task planner userform with comboboxes as selectors for
week numbers. I have set the condition that the target completion week
combobox value must be greater than the start date combobox - however
the combobox is treating the week numbers as text and therefore week
*1*2 is saying it is smaller than week 8 - I would assume that I would
have to set the format of the comboboxes in Userform Initialise sub to
number format - can anyone tell me how I would do this.


--
apndas
------------------------------------------------------------------------
apndas's Profile:

http://www.excelforum.com/member.php...o&userid=36137
View this thread: http://www.excelforum.com/showthread...hreadid=562265



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default userform combobox treating numbers as text


Thanks Nick

Appreciate your help

Regards
darren


--
apndas
------------------------------------------------------------------------
apndas's Profile: http://www.excelforum.com/member.php...o&userid=36137
View this thread: http://www.excelforum.com/showthread...hreadid=562265

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
Pivot table treating numbers as text in value field Rune Wentzel Helms Excel Worksheet Functions 2 July 3rd 09 09:15 AM
2007 treating Text as a Number [email protected] New Users to Excel 2 June 26th 08 07:08 PM
If Function Treating Answer as a Text Box and Not a Numeric Box Brettley Excel Discussion (Misc queries) 3 April 15th 08 10:34 PM
Excel treating text as function Bill P Excel Programming 3 July 15th 05 05:53 PM
Userform text & combobox population help required please Newbie1 Excel Programming 5 February 28th 04 05:19 PM


All times are GMT +1. The time now is 06:36 PM.

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

About Us

"It's about Microsoft Excel"