GetRegistryString

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hi folks,

Could anyone tell me how to fixed the following code?

Public Sub test()
Dim DefPrinter

DefPrinter = GetRegistryString
(HKEY_CURRENT_USER, "Software\Microsoft\WIndows
NT\CurrentVersion\Windows", "Device")

End Sub

When I complied it, I got error message "Sub or function
not defined".

Thanks in advance.

Tim.
 
I don't think the function GetRegistryString is available in VBA. I noticed
the article in Tek-Tips on the use of that function, but I'm convinced that
it refers to VB6 rather than to VBA.
 
Tim there is a way to do this but you will have to use special API
functions.
Access VBA has a function that lets you save your own code settings in the
registry but that is functions Getsettings() and Savesettings() and
DeleteSetting(). Here is a link to a very good resource.
http://www.mvps.org/access/api/api0015.htm
Enjoy!
 
Back
Top