Going from Text to Number Format

  • Thread starter Thread starter mika.
  • Start date Start date
M

mika.

Sorry, I need to rewrite my question. Here is my code:

Selection = Selection.Resize(columnsize:=1).Select
Selection.Cells.NumberFormat = "General"
Selection.Formula = "=Submitter!$F$2"
Selection.Cells.NumberFormat = "Text" 'Error line

Unfortunately, the last line gives me the error "Run-time
error '1004': Unable to set the NumberFormat property of
the Range class. Any ideas as to why and how to get the
selection formatted back to text? The second line
works fine...basically the reason why I want to do this is
that I want it to say what's in submitter!$f$2, but then
want it reformatted back as text...

Thanks for the help.
 
Mika,

try

Selection = Selection.Resize(columnsize:=1).Select
Selection.Clear
'clears the cell contents and formatting and sets format to general
Selection.Formula = " =Submitter!$F$2"

HTH
Henry
 
Back
Top