View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Saving Input on User Form to Hidden Worksheet

Maybe even better than a button with a select case statement would be a
Combobox that you could update as new jobs and new sheets are added. Then
you could just use the click or change event of the Combobox to initate the
retieval for the selected data source.

"Brian" wrote in message
...
I know it really makes no sense why I am doing it this way. Look at it like
this:

1: Job comes in from customer
2: Job is Engineered
3: User form is opened and 3 Workbooks open from the User Form
4: User Form is filled in and 3 work Books are Updated off Info in User
Form
5: 3 Work Books are saved by Control Buttons on User Form
6: Next Job comes in and process is repeated over again on 3 New Work
Books.
7: Now the 1st job has to be Update and Final changes make.
8: User Form is opened and 3 original Work Books are opened by Control
Buttons on User Form. User Form has Control Buttons for opening 3 New
Work
books & opening 3 Exsisting Work Books.
9: When exsisting Work Book "Spec" is opened the User Form fills in from
Data Saved in a Hidden Sheet in the "Spec" Work Book.
10: Work Book is Saved again with Different Appendix No. There for
creating
a new Work Book with it's own Hidden Sheet for the Data. That way I do not
have the keep up with all these data sheets trying to figure out which one
goes with what job.
The Data for each job will be stored with each "Spec" Work Book.

I know it sounds difficult but there could be 100-150 jobs per year and
thats alot of Sheets to keep up with. So what I did was put the User Form
in
it's own Work Book.

1: User Form
2: Eng Spec
3: Installer Forms
4: Folder Label

Also I have a Flow Chart I am Working from. I took Programing Logic in
Collage, but that was 25 years ago and alot has changed since then.

"JLGWhiz" wrote:

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?


.



.