Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Dec 24, 2003
Messages
4
Location
IL
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
 
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

Back
Top