Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Message box to return curency with $ and comma's intact

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Message box to return curency with $ and comma's intact

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Message box to return curency with $ and comma's intact

Hi, I think that the following will work for you
X = Format(Range("D13").Value, "$#,##0.00")

HTH--Lonnie M.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Message box to return curency with $ and comma's intact

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Message box to return curency with $ and comma's intact

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
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
Replace Comma's with Dash [email protected] Excel Worksheet Functions 3 May 5th 23 11:45 AM
Excel:How do I exactly sum 3 rounded curency numbers Old Painterman Excel Discussion (Misc queries) 0 October 21st 09 12:20 AM
WHAT IS THE PROCEDURE TO CHANGE CURENCY IN THE INVOICE WINDOW patrick Excel Discussion (Misc queries) 0 December 12th 05 11:58 AM
Exporting to text, cells with comma's are placed in quotes. -Bad pallid Excel Discussion (Misc queries) 3 October 28th 05 04:41 PM
Curency Conversion Dilemma Michael Excel Worksheet Functions 5 May 27th 05 02:28 PM


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