Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is an example of code I have entered. The return is returning correctly
but the cell referenced is not returning with a $ or commas. I can formatted the cell correctly and I have tried multiple methods includeing Dim x as curreny with X = Range("D13").Value If someone can tell me what i am missing I would appreciate it greatly. Thank you for your help Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = & Range("D13").Value, vbInformation End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ed
one option is to do this: MsgBox "Rate Card Amount Used = " & Format(Range("D13"), "$#,###.00"), vbInformation (note you're also missing a space & " after the =) Cheers JulieD "Ed P" wrote in message ... Below is an example of code I have entered. The return is returning correctly but the cell referenced is not returning with a $ or commas. I can formatted the cell correctly and I have tried multiple methods includeing Dim x as curreny with X = Range("D13").Value If someone can tell me what i am missing I would appreciate it greatly. Thank you for your help Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = & Range("D13").Value, vbInformation End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I think that the following will work for you
X = Format(Range("D13").Value, "$#,##0.00") HTH--Lonnie M. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the text property to see the cell as it is displayed.
Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = & Range("D13").Text, vbInformation End If -- Regards, Tom Ogilvy "Ed P" wrote in message ... Below is an example of code I have entered. The return is returning correctly but the cell referenced is not returning with a $ or commas. I can formatted the cell correctly and I have tried multiple methods includeing Dim x as curreny with X = Range("D13").Value If someone can tell me what i am missing I would appreciate it greatly. Thank you for your help Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = & Range("D13").Value, vbInformation End If |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or maybe
Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = " & Range("D13").Text, vbInformation End If -- HTH RP (remove nothere from the email address if mailing direct) "Ed P" wrote in message ... Below is an example of code I have entered. The return is returning correctly but the cell referenced is not returning with a $ or commas. I can formatted the cell correctly and I have tried multiple methods includeing Dim x as curreny with X = Range("D13").Value If someone can tell me what i am missing I would appreciate it greatly. Thank you for your help Private Sub CommandButton2_Click() If CommandButton1.Value = "Rate Card Regular" Or CommandButton1.Value = "Rate Card Complex" Or CommandButton1.Value = "Rate Card Regular Rush" Or CommandButton1.Value = "Rate Card Complex Rush" Then MsgBox "Rate Card Amount Used = & Range("D13").Value, vbInformation End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace Comma's with Dash | Excel Worksheet Functions | |||
Excel:How do I exactly sum 3 rounded curency numbers | Excel Discussion (Misc queries) | |||
WHAT IS THE PROCEDURE TO CHANGE CURENCY IN THE INVOICE WINDOW | Excel Discussion (Misc queries) | |||
Exporting to text, cells with comma's are placed in quotes. -Bad | Excel Discussion (Misc queries) | |||
Curency Conversion Dilemma | Excel Worksheet Functions |