Select Case oVal.GetType.Name.ToLower.Trim Case "checkbox", "radiobutton" ' Find out what the object is strKey = oVal.text ' Get the key name reg = reg.OpenSubKey(conRegKey, False) ' open the key Try oVal.checked = reg.GetValue(strKey, False)The only issue you may run into is trying to do this after a line continuation, before the next part of the line...
Private Declare Function _ GetWindowLong Lib "user32" _ ' this is an invalid location for a comment Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams