Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to create ComboBox with 3 decimal places, Please Help!

I've created a ComboBox on a UserForm and would like it to display a 3
place decimal (3 significant places), how/where do add code to do this?
I'm just pulling the values from my worksheet for the user to select an
optional size.
I think (hope) this might be the solution to the "rolling Combobox"
problem I'm having; see this post:
http://groups.google.com/group/micro...c1669166f74ac5

I sure would appreciate some advice!
(...my boss is getting a little impatient by now!)

Thanks, Paul

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to create ComboBox with 3 decimal places, Please Help!

Hello
If you are pulling your values from a worksheet, you may consider this:
With Worksheets("Sheet1")
For i = 1 To .Range("A65536").End(xlUp).Row
Me.ComboBox1.AddItem (Format(.Cells(i, 1), "0.000"))
Next i
End With

HTH
Cordially
Pascal


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to create ComboBox with 3 decimal places, Please Help!

Thanks Pascal,
Since I'm not really a VBA wizard (...nor do I play one on TV), could
you please tell me exactly where I might insert this code?

Paul

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to create ComboBox with 3 decimal places, Please Help!

Paul
You may also consider amending the sample code I supplied with
1- the relevant sheet name
2- and the range where your data stands
(in my sample code sheet name is Sheet1 and Data starts from range A1
downwards)


HTH
Cordially
Pascal


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to create ComboBox with 3 decimal places, Please Help!

Can't see my previous post?
So here it is again:
Hello Paul
You may put the code in the Userform_Initialize event

HTH

Cordially
Pascal




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to create ComboBox with 3 decimal places, Please Help!

Thanks Pascal,
I'm putting out another fire at the moment, I should try out the code
early this afternoon. I'll keep you posted.

Paul

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to create ComboBox with 3 decimal places, Please Help!

Yep, that did the trick for the decimal places. Thanks.
Now, do you have ANY idea why my ComboBox won't
retain my selection (this is from the post that I refer to above)?

Paul

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to create ComboBox with 3 decimal places, Please Help!

Pascal,
I fixed the problem that I was having with the ComboBox "rolling" as
described in post linked above.

Thanks for your help. Paul

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
Decimal Places college student ATL Excel Worksheet Functions 4 September 13th 07 02:12 AM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM
decimal places Simon0009 Excel Discussion (Misc queries) 2 June 3rd 05 06:20 PM
Create a marcro that changes number of decimal places in a field according to specified criteria Hayley Middleton Excel Programming 1 November 17th 03 01:47 PM


All times are GMT +1. The time now is 01:49 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"