Login | |
|
 |
RE: converting a long integer to a string - 6/7/2008 10:37:45 AM
|
|
 |
|
| |
TNO
Posts: 1066
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
You could do it if you use the Floating point to your advantage: Dim num: num=1234567890123456/1000 MsgBox Replace(CStr(num),".","")
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
RE: converting a long integer to a string - 6/8/2008 5:48:32 AM
|
|
 |
|
| |
Fredledingue
Posts: 337
Score: 0
Joined: 5/9/2005
From:
Status: offline
|
What is the code to get the number from the database?
_____________________________
Fred
|
|
| |
|
|
|
 |
RE: converting a long integer to a string - 6/10/2008 5:41:27 AM
|
|
 |
|
| |
thorwath
Posts: 42
Score: 0
Joined: 12/6/2006
From: Grand Rapids, MI
Status: offline
|
Just an FYI... I am only working on this script on the weekends (its a little "side" project), so I will be trying some of these interesting suggestion next Sunday. Just wanted to make sure that those who have taken the time to provide ideas do not think I have lost interest! (I moderate a forum on Mercuy QuickTest Pro and hate it when a good reply seemingly never gets used...) -Terry "We all stand on the shoulders of those who have banged on the keyboards before use". So share, share, share.
|
|
| |
|
|
|
 |
RE: converting a long integer to a string - 6/15/2008 12:48:47 PM
|
|
 |
|
| |
thorwath
Posts: 42
Score: 0
Joined: 12/6/2006
From: Grand Rapids, MI
Status: offline
|
DM, Your suggestion to use the ADODB.Recordset COM object code worked like a charm for my problem. Account numbers are now beaten into submission! (Well, at least into readable strings...) The only thing I had to do was strip the unwanted trailing newline that is appended to the string returned by objRecSet.GetString(), which was easy to do using mid(). Thanks to **ALL** for the many helpful suggestions posted to this thread. -Terry
|
|
| |
|
|
|
 |
RE: converting a long integer to a string - 6/16/2008 5:37:06 AM
|
|
 |
|
| |
thorwath
Posts: 42
Score: 0
Joined: 12/6/2006
From: Grand Rapids, MI
Status: offline
|
For anyone who is interested, my script used to validate DM's workaround is attached. the script creates an Excel spreadsheet so Excel mut be installed. Should work with any version of Excel, including 2007. Thanks again for the help on this.
Attachment (1)
|
|
| |
|
|
|
|
|