Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default text boxes & control source

I have an Excel 2000 spreadsheet with a series of (5) input forms. On each
form I have previous and next buttons to navigate back and forth. In each
case I use a code such as:



frmInput01.Hide

frmInput02.Show



On my final form I have a finished button with this code:



Unload frmInput01

Unload frmInput02

Unload frmInput03

Unload frmInput04

Unload frmInput05



I also have a cancel button on each form that unloads all forms.



Within each form I use option buttons (with coding) or text boxes (using the
control source property) to input data into the appropriate cell in the
spreadsheet. Here is my dilemma. I've been using this spreadsheet for some
time now with no significant problems. I recently had to do some
modifications and now not all data from the text boxes is retained when I
finish the input. For example, if I input data into the text box txtA it
will show up on the spreadsheet as long as I have the form open. I can
navigate back & forth between forms with no problems. However, as soon as I
hit the finish button (or cancel) it changes the value in the spreadsheet
cells to (0) zero. What I can't figure out is why it only changes certain
text boxes. Here's the list



Form 1 - 8 text boxes - none are changed

Form 2 - 6 text boxes - 5 go back to zero

Form 3 - 2 text boxes - both go back to zero

Form 4 - 4 text boxes - none are changed



All text boxes have unique names. When I modified the program I made no
changes to forms 1 & 2. Form 3 had a minor change to a label and I made
significant changes to form 4. I tried changing the finish button to hide
all forms (rather than unload) and it still changes the above cells to zero.
I am totally baffled. Is something corrupt in my file? Is there something
I am missing?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default text boxes & control source

I'm guessing that some of the problems are related to the load-unload
actions on the forms and what-ever initializations are occuring

But basically, your method seems pretty cumbersome...

Here's a thought...

Why don't you use a single "Master" form with (x) textboxes. You could
update the single form for each Next or Back click by hiding or unhiding the
correct textbox based on an index, and updating standardized labels and
other form components. This would give you a single form to work with and
all data would be stored on one form. All inits would occur at once and you
are making great use of the "re-use" capability of the tools.

Additionally, you wouldn't have to mess with unloading forms that were never
loaded... everything would be tied to the original "master" form. And any
specific code actions could easily be controlled via Select Case statements
by testing the current "index".

Let me know if you think this might help and I could provide an example
workbook.

Brian






"Robert Dieckmann" wrote in message
...
I have an Excel 2000 spreadsheet with a series of (5) input forms. On

each
form I have previous and next buttons to navigate back and forth. In each
case I use a code such as:



frmInput01.Hide

frmInput02.Show



On my final form I have a finished button with this code:



Unload frmInput01

Unload frmInput02

Unload frmInput03

Unload frmInput04

Unload frmInput05



I also have a cancel button on each form that unloads all forms.



Within each form I use option buttons (with coding) or text boxes (using

the
control source property) to input data into the appropriate cell in the
spreadsheet. Here is my dilemma. I've been using this spreadsheet for

some
time now with no significant problems. I recently had to do some
modifications and now not all data from the text boxes is retained when I
finish the input. For example, if I input data into the text box txtA it
will show up on the spreadsheet as long as I have the form open. I can
navigate back & forth between forms with no problems. However, as soon as

I
hit the finish button (or cancel) it changes the value in the spreadsheet
cells to (0) zero. What I can't figure out is why it only changes certain
text boxes. Here's the list



Form 1 - 8 text boxes - none are changed

Form 2 - 6 text boxes - 5 go back to zero

Form 3 - 2 text boxes - both go back to zero

Form 4 - 4 text boxes - none are changed



All text boxes have unique names. When I modified the program I made no
changes to forms 1 & 2. Form 3 had a minor change to a label and I made
significant changes to form 4. I tried changing the finish button to hide
all forms (rather than unload) and it still changes the above cells to

zero.
I am totally baffled. Is something corrupt in my file? Is there

something
I am missing?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for control source in combo box control dhstein Excel Discussion (Misc queries) 1 August 12th 09 05:38 PM
How do I format a text box control to display the source in time . patrick Excel Programming 3 February 2nd 05 05:52 PM
Text boxes and control source Welshy[_4_] Excel Programming 1 November 18th 04 12:40 PM
Control content of text boxes on a userform Angela[_5_] Excel Programming 3 August 4th 04 04:25 PM
Text Box Control Source Richard Excel Programming 6 May 17th 04 02:17 PM


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"