Text format alternative on a Mac

D

DC

I am using a PC and sending a file to someone who uses a Mac.

Some cells have 'Text' formatting which in VBA is Selection.NumberFormat
= "@"

The Mac throws an error on file open: "File Error: Some number formats
may have been lost"

Does the Mac support Text formatting? Is there workaround?
 
J

JE McGimpsey

DC said:
I am using a PC and sending a file to someone who uses a Mac.

Some cells have 'Text' formatting which in VBA is Selection.NumberFormat
= "@"

The Mac throws an error on file open: "File Error: Some number formats
may have been lost"

Does the Mac support Text formatting? Is there workaround?

Selection.NumberFormat = "@"

works fine in MacXL.

This may be helpful:

http://support.microsoft.com/default.aspx?scid=kb;en-us;213904

However, I've also seen this error in other situations. What line of
code does the debugger stop on?
 
D

DC

JE said:
Selection.NumberFormat = "@"

works fine in MacXL.

This may be helpful:

http://support.microsoft.com/default.aspx?scid=kb;en-us;213904

However, I've also seen this error in other situations. What line of
code does the debugger stop on?

Unfortunately its not on my computer, I undersand that it throws the
message and gives an exclamation mark beside the Text formatted cells.

I am trying to stop Excel from discarding leading zeros, if any, from
variable length numeric entries. Is there a different solution than
using Text format?
 
P

PhilD

DC said:
I am trying to stop Excel from discarding leading zeros, if any, from
variable length numeric entries. Is there a different solution than
using Text format?

Would this help?

Go to Format -> Cells. Select Number, then Custom. Say you want five
digit numbers, so 999 will show as 00999. In the Type section, put
00000 (that is, as many zeros as you want visible characters). Then
OK. Of course, you need to do this for all cells that need this format
(select tham all at once first to save doing this umpteen times).

I find that this formatting transfers between PC and Mac without
problem.

(Sorry if this is no help and I've got the wrong end of the stick).

PhilD
 
Top