|
-
Jun 12th, 2006, 01:22 PM
#1
Thread Starter
Junior Member
[RESOLVED] Reading Excel sheet in VB, need to read the leading zeros
Hi, I am quite newbie to excel and vb, but trying to make something with them, I need help now though.
My excel contains a Cell value of say "0342345534", and I want to read it like this :
Dim f As String
f = objDepReqSheet.Cells(1,2).Value()
the thing is that f keeps getting the value "342345534" rather than "0342345534".
I tried also :
f = objDepReqSheet.Cells(1,2).Value().ToString() ' This does the same
and:
f = objDepReqSheet.Cells(1,2).ToString() ' This yields System._comObject
How can I make string f get the correct value ?
thank a bunch in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|