Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading the Registry
I would like my application to read the registry each time it opens to
confirm that "HKEY_CURRENT_USER\Software\[my application]\[my RegEntry] exists. I read JW's explanation but am struggling to make it fit my purpose: If [my RegEntry] exists, then open application, else MsgBox "Sorry" close application. Can someone please advise. Thank you. Jim Kobzeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading the Registry
Here is an example
Dim oWSH As Object Dim sResult Set oWSH = CreateObject("WScript.Shell") On Error Resume Next sResult = oWSH.RegRead("HKCU\Software\myApp\myKey\") If Err.Number < 0 Or sResult = "" Then MsgBox "No valid key" Me.Close savechanges:=False End If Err.Clear On Error GoTo 0 -- HTH RP (remove nothere from the email address if mailing direct) "JK" wrote in message news:4OpWd.25746$QQ3.1671@trnddc02... I would like my application to read the registry each time it opens to confirm that "HKEY_CURRENT_USER\Software\[my application]\[my RegEntry] exists. I read JW's explanation but am struggling to make it fit my purpose: If [my RegEntry] exists, then open application, else MsgBox "Sorry" close application. Can someone please advise. Thank you. Jim Kobzeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Value from Registry | Excel Programming | |||
Reading the Registry - CSV Download Flag | Excel Programming | |||
Confirm Open After Download - Reading Registry | Excel Programming | |||
Registry | Excel Programming | |||
Registry | Excel Programming |