VBA functions vs. API 
Author Message
 VBA functions vs. API

I need to store some settings in the system registry.  I'm familiar with
the built-in VB functions GetSetting and SaveSetting.  I also know how
to use the API registry functions.  What I want to know is: Is one
method better than the other?  What are the pros and cons of each
method?

Thanks,

Jim K



Fri, 23 Mar 2001 03:00:00 GMT  
 VBA functions vs. API
The SaveSetting and GetSetting methods put the values into a very limited
sub-tree, something like:

HKEY_CURRENT_USER\Software\VB Applications

That's all you get.  The moment another user logs on to the PC, all settings
must be re-entered for that user.  You can't enter global settings under
HKEY_LOCAL_MACHINE, which was the biggest problem I encountered.

Take the time to get the API working.  It's worth it.

--
Remove NOSPAM woven into e-mail address when replying directly.



Fri, 23 Mar 2001 03:00:00 GMT  
 VBA functions vs. API
Although the tree structure is limited, it is not true that the settings
created by SaveSetting are wiped out when a new user logs in to the
computer.  I just tested this again to be sure, and all settings in the
registry (saved with SaveSetting in  my Access app) persisted when I
logged in as a different user.

Keri Hardwick

Quote:

> The SaveSetting and GetSetting methods put the values into a very limited
> sub-tree, something like:

> HKEY_CURRENT_USER\Software\VB Applications

> That's all you get.  The moment another user logs on to the PC, all settings
> must be re-entered for that user.  You can't enter global settings under
> HKEY_LOCAL_MACHINE, which was the biggest problem I encountered.

> Take the time to get the API working.  It's worth it.

> --
> Remove NOSPAM woven into e-mail address when replying directly.



Sat, 24 Mar 2001 03:00:00 GMT  
 VBA functions vs. API
The drawback with the built-in VB functions is that they let you work ONLY
with the keys and values below a given key, namely
HKEY_CURRENT_USER\Software\Microsoft\VB and VBA Program Settings. If you
need to read values from another part of the Registry, you'll need the API
functions.
Quote:

>I need to store some settings in the system registry.  I'm familiar with
>the built-in VB functions GetSetting and SaveSetting.  I also know how
>to use the API registry functions.  What I want to know is: Is one
>method better than the other?  What are the pros and cons of each
>method?

>Thanks,

>Jim K



Sun, 25 Mar 2001 03:00:00 GMT  
 VBA functions vs. API

Quote:
> I need to store some settings in the system registry.  I'm familiar with
> the built-in VB functions GetSetting and SaveSetting.  I also know how
> to use the API registry functions.  What I want to know is: Is one
> method better than the other?  What are the pros and cons of each
> method?

If you only need to store your own program settings, then use the built-in functions. THere's
no reason that I can think of to store temporary app settings elsewhere, and it's incredibly
easy to use the built-in functions. If you must write to a specific location for a specific
reason, then you'll need to use the API, of course. -- Ken


Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie confused: VB6 vs VB.Net vs VBScript vs VBA

2. Newbie confused: VB6 vs VB.Net vs VBscript vs VBA

3. Acc2000 vs Acc2.0 VBA function Compile problem

4. use SetFileTime API function on VBA

5. vba access vs vba excel (alguien sabe?)

6. Access97 vba VS Access2000 vba

7. VBA 5 vs VBA 4

8. Excel 97 VBA vs Excel 2000 VBA

9. Interpretive VBA vs. Compiled VBA extensions to Project

10. Proj 98 VBA vs Proj 2000 VBA

11. Word VBA vs Excel VBA

12. VBA 97 vs VBA 2000

 

 
Powered by phpBB® Forum Software