I really don't know how to ask this question, but I'll try...
I have a userform that has severl textboxes for a user to input parameters to calculate production output. Everything else is working perfectly so far, except the [Save] function. This is what I need:
When a user clicks the [Save] button, another userform pops up asking for [Machine No] and [Product Code], then these two strings will be joined together to create the key, followed by delimited data storing the parameters. It will look something like this in the saved file:
The first string is a combination of [Machine No] and [Product Code], the next three are parameters, delimited by spaces.
Then, the next time the user opens this form and clicks the [Load] button, another form will pop up with a listbox showing two columns: MachineNo|ProductCode. This will show all the records saved so far, and when an entry is clicked, the corresponding parameters will populate the textboxes. Note that [Machine No] and [Product Code] are only used during save and load, they are not needed anywhere else in the form.
Finally, the saved records must be unique. If the user tries to save duplicate information (Machine/Product combo that already exists), the program should be able to trap it, overwriting existing if the user chooses to.
Can someone give me a guideline on how to do this? I've searched around, I know the saved files can be read line by line, but I need to read the file by the first string of each line, followed by delimited data.
I can take care of the interface and all myself, just need to know how I should save/load the data this way.
Thanks for any input.
I have a userform that has severl textboxes for a user to input parameters to calculate production output. Everything else is working perfectly so far, except the [Save] function. This is what I need:
When a user clicks the [Save] button, another userform pops up asking for [Machine No] and [Product Code], then these two strings will be joined together to create the key, followed by delimited data storing the parameters. It will look something like this in the saved file:
Code:
M21P0124 227 115.6 94
M33P0376 312 121 188
AK4A344 110 400 76
M47P1215-2 311 66 48
The first string is a combination of [Machine No] and [Product Code], the next three are parameters, delimited by spaces.
Then, the next time the user opens this form and clicks the [Load] button, another form will pop up with a listbox showing two columns: MachineNo|ProductCode. This will show all the records saved so far, and when an entry is clicked, the corresponding parameters will populate the textboxes. Note that [Machine No] and [Product Code] are only used during save and load, they are not needed anywhere else in the form.
Finally, the saved records must be unique. If the user tries to save duplicate information (Machine/Product combo that already exists), the program should be able to trap it, overwriting existing if the user chooses to.
Can someone give me a guideline on how to do this? I've searched around, I know the saved files can be read line by line, but I need to read the file by the first string of each line, followed by delimited data.
I can take care of the interface and all myself, just need to know how I should save/load the data this way.
Thanks for any input.