Storing numbers in text fields

  • Thread starter Thread starter bg_ie
  • Start date Start date
B

bg_ie

Hi,

I have a column which I format as follows -

Columns("B:D").NumberFormat = "@"

The issue is that some of the fields in this column contain numbers
and excel is flagging the fact that numbers are being saved as text. I
don't wan't excel to do this, what should I do?

Public value As String
...
Cells(RowCount, 3) = value

My column -

IDs

9899389
9A37884
9882D23
9288930

Thanks,

Barry.
 
Barry,

You could always use the following:

Application.ErrorCheckingOptions.NumberAsText = False

but remember to switch it back to true at the end of your code if
being used on other people's machines.

Regards,

Toyin.
 
Yo Barry ...

Did you try either:

Cells(RowCount, 3).value = Cstr(value)
Cells(RowCount, 3).value = Format(value)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top