AlexPonnath
asked on
How can i specify a Format in a Excel Column
I have a function in VB 6 which opens Microsoft Excel and exports the data of
a Query into the worksheet. All works fine but the problem is that i have a field
which i populate with some credit card nbrs and the shhet displays them as a
5.47464E+15 instead of 5474643171576970
so my question, how can i set the format of a specific cell as well as how can i set this
for a specific column
a Query into the worksheet. All works fine but the problem is that i have a field
which i populate with some credit card nbrs and the shhet displays them as a
5.47464E+15 instead of 5474643171576970
so my question, how can i set the format of a specific cell as well as how can i set this
for a specific column
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Actually, following on from Eddy's comment, I think you'd be better to go with ...
Application.Columns("B:B")
A Credit Card number is always 16 digits (at least here in the UK) so you wouldn't want to lose any proceeding zeros, although I doubt any numbers start like that (at the moment!)
Sorry, to answer your question, it's not really a formatting issue. The 'number' has no useful meaning, better to handle it as a string.
The apostrophe doesn't show in Excel by the way.