A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format Control Toolbox Output



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 04:09 PM posted to microsoft.public.powerpoint
slstaggs
external usenet poster
 
Posts: 2
Default Format Control Toolbox Output

Hello,

I've successfully created a PP slide where I can enter values and click a
"calculate" button to automatically see my results (thanks in large part to
this forum!) ...

What I can't seem to do however is format the results as either a number
with the thousands separator, or as currency - either USD or Euro.

My (partial) code currently looks like this:

Private Sub Calculate_Click()
On Error GoTo Err1
Annual_Departures1.Value = Daily_Departures.Value * 365
Annual_Departures2.Value = Daily_Departures.Value * 365
Annual_Departures3.Value = Daily_Departures.Value * 365
Taxi_Ops1.Value = Annual_Departures1.Value * 2
Taxi_Ops2.Value = Annual_Departures1.Value * 2
Taxi_Ops3.Value = Annual_Departures1.Value * 2
TROT1.Value = Taxi_Ops1.Value * 15 / 3600
TROT2.Value = Taxi_Ops1.Value * 22.5 / 3600
TROT3.Value = Taxi_Ops1.Value * 30 / 3600
Savings1.Value = TROT1.Value * OC.Value
Savings2.Value = TROT2.Value * OC.Value
Savings3.Value = TROT3.Value * OC.Value
GoTo Done
Err1:
MsgBox "Please enter values for both 'Airline Daily Departures' and
'Operating
Cost per Hour' before calculating.", vbOKOnly, "Calculating Error
Message"
Done:
End Sub

Private Sub Savings1_Change()

End Sub

Private Sub Savings2_Change()

End Sub

Private Sub Savings3_Change()

End Sub

I've done some research on VB coding and I see where they have codes for
currency formatting, but I can't figure out WHERE to put the codes ...

Any help you could provide is greatly appreciated!

Regards,

Shanda

  #2  
Old May 12th, 2010, 08:42 AM posted to microsoft.public.powerpoint
John Wilson
external usenet poster
 
Posts: 6,023
Default Format Control Toolbox Output

See if something like this works
Thousands
Annual_Departures1.Value = Format(Daily_Departures.Value * 365, "#,#.00")
Dollars
Annual_Departures1.Value = "$" & Format(Daily_Departures.Value * 365,
"#,#.00")
--
john ATSIGN PPTAlchemy.co.uk

Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoi...tutorials.html






"slstaggs" wrote:

Hello,

I've successfully created a PP slide where I can enter values and click a
"calculate" button to automatically see my results (thanks in large part to
this forum!) ...

What I can't seem to do however is format the results as either a number
with the thousands separator, or as currency - either USD or Euro.

My (partial) code currently looks like this:

Private Sub Calculate_Click()
On Error GoTo Err1
Annual_Departures1.Value = Daily_Departures.Value * 365
Annual_Departures2.Value = Daily_Departures.Value * 365
Annual_Departures3.Value = Daily_Departures.Value * 365
Taxi_Ops1.Value = Annual_Departures1.Value * 2
Taxi_Ops2.Value = Annual_Departures1.Value * 2
Taxi_Ops3.Value = Annual_Departures1.Value * 2
TROT1.Value = Taxi_Ops1.Value * 15 / 3600
TROT2.Value = Taxi_Ops1.Value * 22.5 / 3600
TROT3.Value = Taxi_Ops1.Value * 30 / 3600
Savings1.Value = TROT1.Value * OC.Value
Savings2.Value = TROT2.Value * OC.Value
Savings3.Value = TROT3.Value * OC.Value
GoTo Done
Err1:
MsgBox "Please enter values for both 'Airline Daily Departures' and
'Operating
Cost per Hour' before calculating.", vbOKOnly, "Calculating Error
Message"
Done:
End Sub

Private Sub Savings1_Change()

End Sub

Private Sub Savings2_Change()

End Sub

Private Sub Savings3_Change()

End Sub

I've done some research on VB coding and I see where they have codes for
currency formatting, but I can't figure out WHERE to put the codes ...

Any help you could provide is greatly appreciated!

Regards,

Shanda

  #3  
Old May 13th, 2010, 05:26 PM posted to microsoft.public.powerpoint
slstaggs
external usenet poster
 
Posts: 2
Default Format Control Toolbox Output

Hi John,

I played around with your suggestions a little and came up with:

Savings1.Value = Format(TROT1.Value * OC.Value, "$ #,###")

Works like a charm - thank you so much!!

For future reference, if I have more questions regarding MS Visual Basic
coding (which I'm sure I will!) is this the best forum on which to post?

Best regards,

Shanda

"John Wilson" wrote:

See if something like this works
Thousands
Annual_Departures1.Value = Format(Daily_Departures.Value * 365, "#,#.00")
Dollars
Annual_Departures1.Value = "$" & Format(Daily_Departures.Value * 365,
"#,#.00")
--
john ATSIGN PPTAlchemy.co.uk

Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoi...tutorials.html






"slstaggs" wrote:

Hello,

I've successfully created a PP slide where I can enter values and click a
"calculate" button to automatically see my results (thanks in large part to
this forum!) ...

What I can't seem to do however is format the results as either a number
with the thousands separator, or as currency - either USD or Euro.

My (partial) code currently looks like this:

Private Sub Calculate_Click()
On Error GoTo Err1
Annual_Departures1.Value = Daily_Departures.Value * 365
Annual_Departures2.Value = Daily_Departures.Value * 365
Annual_Departures3.Value = Daily_Departures.Value * 365
Taxi_Ops1.Value = Annual_Departures1.Value * 2
Taxi_Ops2.Value = Annual_Departures1.Value * 2
Taxi_Ops3.Value = Annual_Departures1.Value * 2
TROT1.Value = Taxi_Ops1.Value * 15 / 3600
TROT2.Value = Taxi_Ops1.Value * 22.5 / 3600
TROT3.Value = Taxi_Ops1.Value * 30 / 3600
Savings1.Value = TROT1.Value * OC.Value
Savings2.Value = TROT2.Value * OC.Value
Savings3.Value = TROT3.Value * OC.Value
GoTo Done
Err1:
MsgBox "Please enter values for both 'Airline Daily Departures' and
'Operating
Cost per Hour' before calculating.", vbOKOnly, "Calculating Error
Message"
Done:
End Sub

Private Sub Savings1_Change()

End Sub

Private Sub Savings2_Change()

End Sub

Private Sub Savings3_Change()

End Sub

I've done some research on VB coding and I see where they have codes for
currency formatting, but I can't figure out WHERE to put the codes ...

Any help you could provide is greatly appreciated!

Regards,

Shanda

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.