Converting a LongInteger into String??

winkmich

Registered User.
Local time
Today, 14:20
Joined
Jun 21, 2002
Messages
18
Hi there,

I added a command button to a form which is supposed to open an "Explorer"-window. The path is related to the actual ID.

So far I used the StringFromGUID-command, but it didn't seem to work.


Private Sub Command280_Click()
On Error GoTo Err_Command280_Click

Dim stAppName As String
Dim IDName As String

IDName = StringFromGUID(ContactsID)

stAppName = "explorer.exe f:\Database\LettersDirectories\" + IDName
Call Shell(stAppName, 1)

Exit_Command280_Click:
Exit Sub
........

But the warning shows "Type Mismatch", I guess I cannot convert the the ContactsID (which is a LongInteger) into String by using the StringFromGUID-command.

Does anybody know how to convert the ContactsID-LongInteger into a String which can be used further?

Thanks in advance.

Michael.
 
Try using Str(<your long integer>)

Might help to define the variable you are assigning the value to as a Variant rather than a string too.
 
CStr([LongIntegerValue])
 
Convert String

Cstr-Command worked perfectly. Great!

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom