Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

savesetting help 1

Status
Not open for further replies.

marduk813

Programmer
Jul 18, 2002
89
US
I recently learned how to use SaveSetting and GetSetting, and while it has been very useful, I'm having a small problem. My code works fine on my system, but when I try it on another system, it doesn't save anything to the registry. Both systems are running Office 2000, and macros are enabled. I should mention that the rest of the code runs fine; it's just the SaveSetting that doesn't seem to write anything to the registry (on the second computer).
 
I have since tried this code on 3 other systems: 2 running Windows 2000 Pro, and 1 running Windows XP Pro. The SaveSetting line works fine on the XP box and one of the 2K machines, but not on the other. The only difference I can find is that the other 2K machine doesn't have the "VB and VBA Program Settings" section in the system registry. Am I missing something here? Other than the needed registry section, that is. What is necessary for that section of the registry to be in place?
 
Hi marduk813,

There is no prerequisite for this that you should need to care about. The "VB and VBA Settings" key should be created automatically if it doesn't exist.

I can't think of any particular reason for failure but you should get an error if it does fail - it shouldn't just not work. You don't have an active "On Error Resume" trap set, do you?

Enjoy,
Tony
 
Thanks for the reply Tony. As it turns out, my SaveSetting lines were working just fine, it's just that those lines were never being run because of an invalid comparison I was making in an earlier step.
It was actually a "type mismatch" error on one of the systems that eventually led me to the solution. Strange that I didn't get the error message on every system, but oh well.
Again, thanks for the reply and here's a star for good measure.

Jas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top