end if
end if
rtn = regclosekey(hkey) 'close the key
else 'if there was an error opening the key
if displayerrormsg = true then 'if the user wants errors displayed
msgbox errormsg(rtn) 'display the error
end if
end if
end if
end function