Solved

EASY - VB 6 Forms save

Posted on 2004-08-02
4
210 Views
Last Modified: 2010-08-05
Hello,

I have a problem with my VB 6 Project.

If i have a label on a form called 'theform' on a label called 'thelabel' that says "Hello" i can edit this by using code like ...

theform.thelabel = "Goodbye"

this works fine.  However, if i close my running project, and then start it back up again the labe has changed back to "Hello" and has not saved my changes.

I know in Access you have to edit a form in design mode for the changes to save, i dont think there is any kind of design mode in VB is there?

Does anyone know how i can save my changes to my vb form?

Thanks,

Daz
0
Comment
Question by:yo_daz_uk
[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
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 11693022
You can store the value in a file (xml, ini, ...).
When you start the program, you can load the value from that file and if you close your form, save the values back into the file.
0
 

Author Comment

by:yo_daz_uk
ID: 11693078
I thought about just getting it from a text file or even setting up a mini database for all my forms so they would be easy to change, however this seemed a bit excessive, for what i would think is a minor change.

I have only got 4 forms in the project!!!

Is there no simple save method or anything like that?  That would save it to the form some how?
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 30 total points
ID: 11693104
No there's no alternative. Each vb-form must be compiled before it can be used. When you change something to it, it means you'll have to recompile it.
So the only options there are is using a resource file (ini, xml, txt, ...) or like you mentioned a database.
0
 

Author Comment

by:yo_daz_uk
ID: 11693124
OK thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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