Solved

Question about GetSetting?

Posted on 2002-07-18
5
187 Views
Last Modified: 2011-09-20
Can someone explain to me what this does? I know it has something to do with the registry.

m_strSaveDir = GetSetting(App.EXEName, "SaveSection", "SaveKey")

Is it assigning a value to the Windows registry?  I know it is being used somehow maybe with a common dialog box.  How do I delete whats in it.
0
Comment
Question by:InvisibleMan
  • 3
5 Comments
 
LVL 4

Expert Comment

by:gencross
Comment Utility
This sets a value to a registry key.

Run regedit.  Once you have the program running choose Edit/Find and search for the key that is in the GetSetting call.  When you find it you can delete it.

NOTE: Deleting a registry key could cause problems with the app that put it there.

0
 
LVL 20

Accepted Solution

by:
hes earned 25 total points
Comment Utility
>>m_strSaveDir = GetSetting(App.EXEName, "SaveSection", "SaveKey")
This is retrieving a registry value from (in win 98)
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\APP.ExeName\SaveSection

It was stored by a
SaveSetting(App.EXEName, "SaveSection", Value)

You can delete it but most programmers who use the GetSetting also look for not there and reset it to a default
 
0
 
LVL 4

Expert Comment

by:gencross
Comment Utility
Sorry...Didn't look closely enough.  This does get the setting not save it.
0
 

Author Comment

by:InvisibleMan
Comment Utility
Thanks guys do you think because a dialog box is being used and some drive mappings that it is being used to set the path.  I know that it is actually saving a path to a text file.  For example, C:\Testing.txt.  So now everytime the code runs its pulling into m_strSaveDir that path.  Should I delete it or just default it to nothing?
0
 
LVL 4

Expert Comment

by:gencross
Comment Utility
If you are not going to use the registry setting any further then delete it and get rid of the code that Gets/Sets it.  No need to do more than you have to.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now