String -> Guid

M

Mike Lambert

How do you convert a string that holds a valid guid value to a variable of
guid type.

ex.

dim sTest as string
dim gTest as guid

sTest="4D36E96A-E325-11CE-BFC1-08002BE10318" 'valid guid
gTest=sTest 'Error on this line. What would be the proper function to
call..

Thanks Mike.
 
S

Scott M.

Dim gTest As New Guid("4D36E96A-E325-11CE-BFC1-08002BE10318")
....or...
Dim sTest As String = "4D36E96A-E325-11CE-BFC1-08002BE10318"
Dim gTest As new Guid (sTest)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top