String -> Guid

  • Thread starter Thread starter Mike Lambert
  • Start date Start date
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.
 
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)
 
Back
Top