View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Prevent conversion to date format

Prefacing the entry with an apostrophe makes it a label and the following
snippet inserts the entry in the currently active cell:

Application.ActiveCell.Value = "'1-0"
--
Kevin Backmann


"Robert Lipman" wrote:

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