Converting a LongInteger into String?? (1 Viewer)

winkmich

Registered User.
Local time
Today, 19:49
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.
 

helenlou

Registered User.
Local time
Today, 19:49
Joined
Feb 21, 2002
Messages
15
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.
 

Fornatian

Dim Person
Local time
Today, 19:49
Joined
Sep 1, 2000
Messages
1,396
CStr([LongIntegerValue])
 

winkmich

Registered User.
Local time
Today, 19:49
Joined
Jun 21, 2002
Messages
18
Convert String

Cstr-Command worked perfectly. Great!

Thanks again.
 

Users who are viewing this thread

Top Bottom