Why won't this getsetting code work?

Why won't this getsetting code work?

Anonymous
Not applicable
374 Views
2 Replies
Message 1 of 3

Why won't this getsetting code work?

Anonymous
Not applicable
I've been trying to retrieve the default plotter setting from the registry as follows...

Pltr1 = GetSetting("HKEY_CURRENT_USER\Software\Autodesk", "AutoCAD\R15.0\ACAD-1:409\Profiles\commodore\General", "DefaultConfig", "NUTTIN")

I can not get it to return "HP5P" which is the value of that key. It only returns "NUTTIN" (or "" if getsetting default is removed). What am I doing wrong?

P.S. I am a VBA Virgin so be gentle with me!
John
0 Likes
375 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I believe GetSetting can only retrieve values from subkeys of
KEY_CURRENT_USER\Software\VB and VBA Program Settings. There are API calls
for more general registry access. Unfortunately, I don't have any
experience with them. I'm sure you could find something if you searched
through past posts, though.

Chuck


"Loki" wrote in message
news:f108f64.-1@WebX.maYIadrTaRb...
> I've been trying to retrieve the default plotter setting from the registry
as follows...
> Pltr1 = GetSetting("HKEY_CURRENT_USER\Software\Autodesk",
"AutoCAD\R15.0\ACAD-1:409\Profiles\commodore\General", "DefaultConfig",
"NUTTIN")
>
> I can not get it to return "HP5P" which is the value of that key. It only
returns "NUTTIN" (or "" if getsetting default is removed). What am I doing
wrong?
>
> P.S. I am a VBA Virgin so be gentle with me!
> John
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
GetSetting() and SaveSetting in VB and VBA only
access particular part of Windows registry: keys underneath
"HKEY_CURRENT_USER\Software\VB and VBA Program Settings\". Other than that, you
have use Win32 API,  I guess.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I've
been trying to retrieve the default plotter setting from the registry as
follows...

Pltr1 = GetSetting("HKEY_CURRENT_USER\Software\Autodesk",
"AutoCAD\R15.0\ACAD-1:409\Profiles\commodore\General", "DefaultConfig",
"NUTTIN")

I can not get it to return "HP5P" which is the value of that key. It only
returns "NUTTIN" (or "" if getsetting default is removed). What am I doing
wrong?

P.S. I am a VBA Virgin so be gentle with me!

John

0 Likes