Saving settings on the vba forms

Dear all,

In many cases, I have to do some settings (e.g. text size, starting number) in the form before execution the programme. However, that would be very tiring if I need to redo the same setting wheneven I restart the form in different documents. Is it possible to save the setting in the memory, file or registry?

Thanks very much
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Look into SaveSetting, GetSetting and DeleteSetting functions. It will give you a fairly easy way to save some data in the registry for reading the next time your program loads.
Whilst it is certainly possible to save setting to the Registry it is not a brilliant idea as it is not portable so others cannot make use of the file. The other main problem is that in most work environments access to the Registry is intentionally blocked.

Having said that attached is a small file with a macro that saves data to the Registry. Hope it helps.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LawlordsAuthor Commented:
Thanks Frosty555 :

 I finally know how to save, get and the delete the settings by those functions after research from various websites.

Thanks patrickab:  

Your sample file really give me a quick help in applying the functions. I was quite confused by reading the technical websites before getting the real example.
Lawlords - Thanks for the grade - Patrick
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.