warrenelec
Mechanical
- Oct 31, 2003
- 37
Hi,
I'm pretty new to VB and have pretty much taught myself, so this should be pretty easy. I have created a pricing program in MS Excel w VB macros where I would like the user to input variables into a form, then variables would be entered into cells. I would like to:
A) allow the user to only enter numerical data into the text box
B) have the text box display the entered values in dollars & cents format
Some of the text box values are retrieved from the spreadsheet, as I have programmed extensively in excel.
When these values are displayed in the text box, it is formatted 26.2 instead of $26.20.
example of code:
If ComboBox11 = "Bolts" Then
ComboBox6.Text = "adder"
TextBox6.Text = Worksheets("PRICE").Range("BA34")
End If
Any easy way to format cell BA34 to display as currency?
I have searched the web, however this seems to be a little different from other applications.
Any help is appreciated!
Warren
I'm pretty new to VB and have pretty much taught myself, so this should be pretty easy. I have created a pricing program in MS Excel w VB macros where I would like the user to input variables into a form, then variables would be entered into cells. I would like to:
A) allow the user to only enter numerical data into the text box
B) have the text box display the entered values in dollars & cents format
Some of the text box values are retrieved from the spreadsheet, as I have programmed extensively in excel.
When these values are displayed in the text box, it is formatted 26.2 instead of $26.20.
example of code:
If ComboBox11 = "Bolts" Then
ComboBox6.Text = "adder"
TextBox6.Text = Worksheets("PRICE").Range("BA34")
End If
Any easy way to format cell BA34 to display as currency?
I have searched the web, however this seems to be a little different from other applications.
Any help is appreciated!
Warren