FindFormat.NumberFormat fails with some strings

N

NickHK

Excel 03:

Any ideas why some NumberFormat strings fail ?
e.g. "$"#,##0_);("$"#,##0)

Application.FindFormat.NumberFormat = strFormatString

Seems to error when a non-custom string is applied.

Found an old post from keepITcool to get the list of Built-in numberformats,
but prefer not to go that way.

'Newsgroups: microsoft.public.Excel.programming
'Date: Thu, 01 Jul 2004 16:21:46 -0700
'Local: Fri 2 Jul 2004 07:21
'Subject: Re: Leo Heuser format cleanup code, and a question

NickHK
 
J

Jim Rech

Might be the quotes aren't right. This works for me:

strFormatString = """$""#,##0_);(""$""#,##0)"

--
Jim
| Excel 03:
|
| Any ideas why some NumberFormat strings fail ?
| e.g. "$"#,##0_);("$"#,##0)
|
| Application.FindFormat.NumberFormat = strFormatString
|
| Seems to error when a non-custom string is applied.
|
| Found an old post from keepITcool to get the list of Built-in
numberformats,
| but prefer not to go that way.
|
| 'Newsgroups: microsoft.public.Excel.programming
| 'Date: Thu, 01 Jul 2004 16:21:46 -0700
| 'Local: Fri 2 Jul 2004 07:21
| 'Subject: Re: Leo Heuser format cleanup code, and a question
|
| NickHK
|
|
 

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

Top