Conditional Formating

  • Thread starter Thread starter David
  • Start date Start date
D

David

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
 
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)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top