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

I have a number of textboxs, which display formated
numbers and currency symbols. I would like to expand my
worksheet to include other currencies, like ?, ¢, £, etc.

I know that I can set up if then statments to account for
users selection of currency, however, That involves an
aweful lot of duplicate code considering the number of
textboxes, and the currencies i would like to support.

the formatted text line looks like this

TBPrt.Text = Format(Worksheets("pricing").Range
("ad4"), "$##,##0.00")

Is there an easy way for me to have that currency symbol
be variable based on user selection of currency on the
title page. Any assistance on an easier way than just
doing if then statements would be greatly appreciated.

Thanks
Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Conditional Formating

David,

If I understand correctly, could you not setup a module level variable for
the currency format. Something like

ccyFormat = ccyId & "#,###,##0.00"

where ccyId is the selected currecncy symol, £, $ or whatever, and then use
like

TBPrt.Text = Format(Worksheets("pricing").Range("ad4"), ccyFormat)

--

HTH

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

"David" wrote in message
...
I have a number of textboxs, which display formated
numbers and currency symbols. I would like to expand my
worksheet to include other currencies, like ?, ¢, £, etc.

I know that I can set up if then statments to account for
users selection of currency, however, That involves an
aweful lot of duplicate code considering the number of
textboxes, and the currencies i would like to support.

the formatted text line looks like this

TBPrt.Text = Format(Worksheets("pricing").Range
("ad4"), "$##,##0.00")

Is there an easy way for me to have that currency symbol
be variable based on user selection of currency on the
title page. Any assistance on an easier way than just
doing if then statements would be greatly appreciated.

Thanks
Dave


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
Conditional formating Brian Excel Discussion (Misc queries) 2 December 10th 07 07:44 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Help Please with Conditional FOrmating James M Excel Worksheet Functions 2 August 4th 05 09:05 AM
conditional formating Jed Excel Discussion (Misc queries) 3 June 14th 05 05:11 PM
Conditional formating Esrei Excel Discussion (Misc queries) 4 March 2nd 05 12:34 PM


All times are GMT +1. The time now is 10:09 AM.

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"