I got more proper hungarian notation, AND I got this in too :
VB Code:
MsgBox myForm.Name & "." & myControl.Name
whereas you had this pathetic attempt
VB Code:
'some code goes here
So :P
i took that from the posters original code which to me implied that they already had code or an idea for code that they wanted there... thus making my code much more understandable to the person that asked the question...
Originally posted by kleinma glad to hear you got it working.. me and plender were just messin with eachother... besides he has a habit of usually beating me to the post
That's just because I'm better than kleinma.
Better in every way.
Well...you might have some suggestions or code for me.
I'm trying to create an option in my App to Save all values of the Textboxes, ListBoxes, CheckBoxes, OptionBoxes etc. to a file...and read in again...
It was all working fine..but when I started using some Control Arrays it didn't work out anymore. As it's more difficult to store the stuff in the file...
How can I store...besides
frmInput.txtBla|TextValue
also store the type; frmInput.txtBla|TextValue|TextBox
The hardest part to my opinion is controls in Control Arrays do have an index other's don't (343 Error)...
This gives me a headache aswell..when loading...
txtBox.Text
checkBox.Value
cboBox.Index
Might sound a little confusing..that's to make it more challenging :P
See who's the fastest...
Originally posted by Chrissie Well...you might have some suggestions or code for me.
I'm trying to create an option in my App to Save all values of the Textboxes, ListBoxes, CheckBoxes, OptionBoxes etc. to a file...and read in again...
It was all working fine..but when I started using some Control Arrays it didn't work out anymore. As it's more difficult to store the stuff in the file...
How can I store...besides
frmInput.txtBla|TextValue
also store the type; frmInput.txtBla|TextValue|TextBox
The hardest part to my opinion is controls in Control Arrays do have an index other's don't (343 Error)...
This gives me a headache aswell..when loading...
txtBox.Text
checkBox.Value
cboBox.Index
Might sound a little confusing..that's to make it more challenging :P
See who's the fastest...
*runs back to help*
well i would use a database if i were doing this.. because it is easier to store the info...
but lets say you have 2 textboxes and a combobox
you have 3 fields in a database
CustomerName
CustomerAccount
ReasonForCall
your controls on the form are
txtCustName
txtAcctNum
cmboCallRsn
you can easily store these values in the cooresponding fields in the database and read them back in the form just as easy because you will know what goes with what...
You could write a setting that states what sort of object this piece of text is going into.
And then when reading check what sort of object its going into, and then use .Text, .Value or .Caption accordingly
Database or Flatfile isn't the problem...
When reading out of the flatfile I put it in an array...so would I do when using a database....
cboBla|0|ControlBox
Problem is the .value .text .listindex
and how to get the Control Type...
Control.Type or something like this...
VB Code:
elements = Split(data, "|")
If someone has a suggestions thanks...If not this topic can be closed..
The text file is meant to be used as an Config file...like an INI file...So user can read in their settings again...