?
Solved

Question about GetSetting?

Posted on 2002-07-18
5
Medium Priority
?
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 4

Expert Comment

by:gencross
ID: 7163159
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 100 total points
ID: 7163179
>>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
ID: 7163246
Sorry...Didn't look closely enough.  This does get the setting not save it.
0
 

Author Comment

by:InvisibleMan
ID: 7163776
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
ID: 7164486
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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