Solved

EASY - VB 6 Forms save

Posted on 2004-08-02
4
209 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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

739 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