Mar 7, 2019 This code is to check if a string is a valid GUID. Code: Copy Sub IsGuid(GUID As String) As Boolean Return Regex.IsMatch("^(\{){0,1}[0-9a-fA-F]{8}\-" & _ "[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-" & _ "[0-9a-fA-F]{12}(\}){0,1}$", GUID) End Sub Source: http://www.vbforums.com/showthread.php?447414-Solved-Check-if-string-is-Guid&p=2750956#post2750956 Click to expand...
This code is to check if a string is a valid GUID. Code: Copy Sub IsGuid(GUID As String) As Boolean Return Regex.IsMatch("^(\{){0,1}[0-9a-fA-F]{8}\-" & _ "[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-" & _ "[0-9a-fA-F]{12}(\}){0,1}$", GUID) End Sub Source: http://www.vbforums.com/showthread.php?447414-Solved-Check-if-string-is-Guid&p=2750956#post2750956