Saving Input on User Form to Hidden Worksheet
I need to save the Input on the User Form in one of the Wook Books, so that
if the Work Book is opened again the User Form automatically Fills back in.
My suggestion to use the workbook containing the form was based on your
statement above. I am assuming the the UserForm and its controlling code
are all contained in the same workbook, rather than three separate
workbooks. If that is true, then logically, the workbook with the
controlling code would be the place to store the data to re-populate the
form. All you are doing at that point is putt6ing data back that was there
before the workbook closed. The data will most likely change as soon as the
other workbooks are opened and users make changes.
While the form works with other workbooks, it is controlled for showing,
hiding and unloading by code in only one. I don't know what purpose it
would serve to have the text box data stored in another workbook. It seems
to me that if you are going to use a separate sheet in each workbook to
display data to the users, then you are defeating the purpose of the
UserForm. But, that is your choice to make because you know how the data
will be used..
You are essentially correct about how to transfer the data between a
worksheet and the form.
A tool that I use when trying to organize a complex project is a flow
diagram, similar to CPM or Critical Path Method. I just draw boxes and list
the steps I need to perform to logically proceed to the next step until I
reach my obective. This allows me to see the decisions that will have to be
made where an outside procedure might need to be interjected and where loops
might need to occur for user interface.. Then I tackle one step at a time
when writing the code. I think this is something like what IBM used to
teach back when they were still using punched cards and batch processing,
but it is still a useful planning tool and save a lot of headaches and
debugging.
"Brian" wrote in message
...
My User Form is designed to work in conjunction with 3 other Work Books
for
each Job.
1: Eng Spec
2: Installer Forms
3: Folder Label
Since there will alot of Different Work Books, it would alot easier to
save
the Information from the User Form to A Hidden Sheet in the Work Book (Eng
Spec).
By doing it that way, when ever that Work Book (Eng Spec) is opened the
Information Flows the oppisite direction. As of now the User Form is
filled
Out and all 3 Work Books are Updated off of it. Then all the Work Books
are
saved in there own Job Directory. I want to save the information for each
Job, with that job.
I know this applies if you want to go from the User Form to the Wook Book:
.Range("A09").Value = Me("Office_1").Value
.Range("A10").Value = Me("Address_11").Value
.Range("A11").Value = Me("Address_12").Value
.Range("A12").Value = Me("City_1").Value
I have to assume that if you Reverse the flow would this be the process?
Me("Office_1").Value = .Range("A09").Value
Me("Address_11").Value = .Range("A10").Value
Me("Address_12").Value = .Range("A11").Value
Me("City_1").Value = .Range("A12").Value
"JLGWhiz" wrote:
As Harold points out, it is largely up to the designer as to where the
data
is stored. If you want ease of recovery, then it would probably be wise
to
store it in the same file (workbook)as the UserForm is in. You could use
a
sheet that is not used in the other operations of the project and hide it
when not needed. The process would be to copy the data from the UserForm
before closing the form. Hide the sheet. Save the file before closing
the
workbook. Then when opening the workbook, unhide the sheet and use the
initialize event of the UserForm to repopulate the form from the data
stored
on the sheet. then hide the sheet until you are ready to shut down
again.
"Brian" wrote in message
...
I have a User Form that once it is filled in, it updates several other
Work
Books from different Control Buttons.
I need to save the Input on the User Form in one of the Wook Books, so
that
if the Work Book is opened again the User Form automatically Fills back
in.
Would the Information on the User Form be saved on a hidden Work Sheet
in
the Work Book that I want to save it in?
Any Ideas on how to achive this?
.
|