PDA

View Full Version : Sleeper: List Custom Number Formats



doctorp
12-02-2006, 10:35 AM
Hi Guys

I'm trying to write a sub to list all the custom number formats in a workbook.

I've followed the following code and it works well, to a point..

j-walk.com/ss/excel/eee/eee015.txt

However it seems to use "$" when it should be simply using $.
It also inserts a \ into the format in certain places.

I've used the code to populate a useform list and I then want to be able to delete the selected custom number formats cleanly. However I can't do this if the custom number format in the list does not exactly match the one in the workbook.

Any ideas?

Norie
12-02-2006, 11:13 AM
There's no code in that link.:confused:

Bob Phillips
12-02-2006, 11:14 AM
can you post the code that you are using?

doctorp
12-02-2006, 12:50 PM
Sorry Guys

I've updated the link and attached a file.

The challenge has been set.

Norie
12-02-2006, 02:37 PM
Have you actually checked under Format>Cells... Custom?

There are entries there with "$" rather than just $.

Aussiebear
12-02-2006, 02:58 PM
Do the custom number formats vary with the different versions? I notice that the code to which DoctorP is referring to talks about ver 97 or before, and this section of code was published nearly 7 years ago.

doctorp
12-03-2006, 03:23 AM
Any chance you could tell me how to update the code to version 2000 +.
Is it a simple change to the code?

Aussiebear
12-03-2006, 03:25 AM
Sorry, all I noted was the code in the text referred to ver 97. Perhaps if you contact the author or J-Walk himself since it was on his site. As Norie suggested have you checked under the format>Cells section, as there is really lots of format types there or indeed create one yourself to suit.

doctorp
12-03-2006, 03:48 AM
I'm very familiar with the custom number formats. I've created a tool which helps the average user to create their own custom number formats. It works perfectly. However I'm trying to build this tool to help with selective deletion of custom number formats when there are too many formats.