View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Prevent conversion to date format

Manually, you said you don't want a macro

Select cells and Numberformat (ctrl-1)
Apply the 'Text' item, or type a @ in Custom

or with code
rng.Numberformat = "@"

Regards,
Peter T

"Robert Lipman" wrote in message
...
Hi,

In VBA, how can I set a cell to '1-0' without it being converted to
date format such as Jan-00? I don't want a macro either. I'm
actually generating Excel spreadsheets with Tcl and not VBA, but the
VBA answer should suffice.

Thanks,

Bob