Question

why doesn't this work?

MsgBox("F6D8C47B-46E6-4E93-A393-00085ACA2242").ToString.Replace("-", "")

Was it helpful?

Solution

You're calling ToString on the MsgBox, not the Guid, which apparently is already a string. Try

MsgBox("F6D8C47B-46E6-4E93-A393-00085ACA2242".Replace("-",""))

OTHER TIPS

MsgBox(Guid.NewGuid().ToString("N").ToUpper());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top