Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Format question

Private Sub Postage_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Postage = Format(Postage, "£ #,##0.00")
End Sub

I have the above code in one of my userforms for formatting the Postage
field when I exit from it

I have two amount fields above each other, and I really want to be able
to use Format so that each are properly right aligned
e.g.
£ 1,000.00
£ 9.99

I have the correct fixed font on each so they will be right aligned if
the right number of spaces are in the appropriate space, but can I get
Format to insert the right number of spaces for me?
--
Mike
Please post replies to newsgroup to benefit others
Replace dead spam with ntl world to reply by email
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Format question

Hammer to a nut!

Private Sub Postage_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Postage = Format(Postage, "#,##0.00")
Postage = "£" & Space(10 - Len(Postage)) & Postage
End Sub

and you will need to use a proportional font like Courier


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike NG" wrote in message
...
Private Sub Postage_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Postage = Format(Postage, "£ #,##0.00")
End Sub

I have the above code in one of my userforms for formatting the Postage
field when I exit from it

I have two amount fields above each other, and I really want to be able
to use Format so that each are properly right aligned
e.g.
£ 1,000.00
£ 9.99

I have the correct fixed font on each so they will be right aligned if
the right number of spaces are in the appropriate space, but can I get
Format to insert the right number of spaces for me?
--
Mike
Please post replies to newsgroup to benefit others
Replace dead spam with ntl world to reply by email



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
.csv Re-Format Question Bob[_19_] Excel Discussion (Misc queries) 1 April 12th 10 03:01 PM
Format Question SITCFanTN Excel Discussion (Misc queries) 5 April 8th 10 10:28 PM
Format Question Dabeaks Excel Discussion (Misc queries) 4 July 16th 09 09:42 PM
Format % Question Stan Atshuller Excel Worksheet Functions 3 October 2nd 06 08:54 PM
Format Question VegasBurger Excel Worksheet Functions 2 June 24th 06 06:34 PM


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