![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
I have a combobox in a Userform6 that has a rowsource of sheet2!Interest_rate the drop down shows the rates as percent however after you select the rate you want it shows it as decimal. I had the following code working at one time and now it does not
Private Sub ComboBox2_Change() Worksheets("Sheet2").Range("B20") = UserForm6.ComboBox2.Value UserForm6.ComboBox2.Text = Format(ComboBox2.Text, "#0.00%") End Sub The only thing that has changed from when it worked to when it didnt is the Userform was changed from form6 to 1 as I imported it Am I doing this the wrong way or is there a better way. Please be detailed with instructions so that I could learn better. Thank you so much Derrick |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
Is there someone who could please help with this? Also what is the better book for learning VBA.
thank you |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
[ This Message was edited by: James on 2002-05-25 20:36 ] |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
change UserForm6.ComboBox2.Value UserForm6.ComboBox2.Text = Format(ComboBox2.Text, "#0.00%") To reference your new form = Userform1 ie. Replace all references to Userform6 to userform1 Help: Try http://www.vbatutor.com/vbatutor.htm |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Location: Grand Rapids, MI
Posts: 326
|
ok, I have done that changes, but it still shows it in decimal form after you select it from the list, I guess its not a big deal because it still works like it should I just rather see an interest rate in % then decimal
Derrick Thank you for the help |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|