Formatting a column - needs refresh?

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi,
I am exporting stuff out from a vb program to a .csv file, then optionally
opening this in excel for the user to view. One of the columns of
information contains phone numbers, but when excel opens the file it sees it
as a number and shows it wrong. i.e. 447768123456 comes out as 4.47769E+11.
I have put the following line in my code:

.Columns(2).Select
.Selection.NumberFormat = "@"

which works, except for the cell to refresh to look correct I need to click
on the (correctly displayed) number in the formula bar at the top of the
screen, at which point the number displayed in the cell appears correctly.
How can I automate this step?
Thanks,
James.
 

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