Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel and VB

Status
Not open for further replies.

shay11

Computer
Dec 24, 2003
4
Hi,
I have a question about excel in VB: I'm creating an excel file from VB code, and I have there very long numbers, such as 456654788 (mainly ID numbers). When I insert these numbers into the excel file (through the code) the excel shows them to me like that 4.56+E10 (or something similiar).
My question is how can I force the excel to take these numbers as strings (and all through code ofcourse, I know how to do it thorugh the excel itself...)
Thanks,
Shay
 
Replies continue below

Recommended for you

Have you tried to use the macro recorder to capture how you do it manually?

TTFN
 
You could also try placing one single quote in front of the number
Code:
'456654788
 
Thanks, man, that thing with the ' worked!
Great, you've saved me some troubles...
Shay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor