Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving parameters in the Registry?
Someone gave me some code to manage the storing of parameters in the
registry. I sent him an e-mail asking how to use the macros, but I got back an out-of-office message saying he would be away until June 15th. My problem is the functions have no documentation for the arguments. So I have no idea how to use them. I can send anyone interested the workbook with them all. The functions with their arguments a Function QueryValueEx(ByVal lhKey As Long, ByVal szValueName As String, vValue As Variant) As Long Public Function CreateNewKey(sNewKeyName As String, lPredefinedKey As Long) Public Function SetKeyValue(sKeyName As String, sValueName As String, vValueSetting As Variant, lValueType As Long) Public Function QueryKey(sKeyName As String, sValueName As String) On a Workbook_Open I'd like to see if the registry key exists, if not then to create it and set it to a value of two. If it exists I'd like to read the value and put it in the range FirstMenu. Then in the Workbook_BeforeSave event I like to store the value found in the range FirstMenu. The name of the application is ASF. How would I call these functions? (I'm using xl2002.) Don <www.donwiss.com (e-mail link at home page bottom). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving parameters in the Registry?
Don,
You may find it easier using a class wrapper. Steve McMahon's is easy to use: http://www.****alshah.com/vbxlr/code...g/registry.htm NickHK "Don Wiss" wrote in message ... Someone gave me some code to manage the storing of parameters in the registry. I sent him an e-mail asking how to use the macros, but I got back an out-of-office message saying he would be away until June 15th. My problem is the functions have no documentation for the arguments. So I have no idea how to use them. I can send anyone interested the workbook with them all. The functions with their arguments a Function QueryValueEx(ByVal lhKey As Long, ByVal szValueName As String, vValue As Variant) As Long Public Function CreateNewKey(sNewKeyName As String, lPredefinedKey As Long) Public Function SetKeyValue(sKeyName As String, sValueName As String, vValueSetting As Variant, lValueType As Long) Public Function QueryKey(sKeyName As String, sValueName As String) On a Workbook_Open I'd like to see if the registry key exists, if not then to create it and set it to a value of two. If it exists I'd like to read the value and put it in the range FirstMenu. Then in the Workbook_BeforeSave event I like to store the value found in the range FirstMenu. The name of the application is ASF. How would I call these functions? (I'm using xl2002.) Don <www.donwiss.com (e-mail link at home page bottom). |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving parameters in the Registry?
On Fri, 26 May 2006 11:07:44 +0800, NickHK wrote:
Don Wiss wrote: Someone gave me some code to manage the storing of parameters in the registry. I sent him an e-mail asking how to use the macros, but I got back an out-of-office message saying he would be away until June 15th. My problem is the functions have no documentation for the arguments. So I have no idea how to use them. You may find it easier using a class wrapper. Steve McMahon's is easy to use: http://www.****alshah.com/vbxlr/code...g/registry.htm I found that to be overkill for my needs. And the functions I found in the Class Module also lacked documentation. So I searched on google on one of the function names I had. I found that the functions I was given came from this web page: http://support.microsoft.com/default...145679&sd=tech And on this page they give examples, so I was able to figure it out. Don <www.donwiss.com (e-mail link at home page bottom). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Text to Columns parameters for future use | Excel Discussion (Misc queries) | |||
Value from Registry | Excel Programming | |||
Saving Registry variable to ini file | Excel Programming | |||
Registry | Excel Programming | |||
Registry | Excel Programming |