Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default UserForm Update on the Fly

Using (xl97) I have a userform that opens after a user event to display some
data extracted from a worksheet. On this form is another control button
that is enabled (or not) depending on the state of the extracted data
displayed on the form.

If the control button on the first form is enabled and clicked a second form
opens allowing the user to change some data, which in turn affects the
values on the sheet being the same data used on the first form. Closing the
second form reveals the first form again but of course the data and the
state of the enabling button has not changed.

Is there anyway that the first form can dynamically change in response to
the users action on the second form?

I had thought about closing and re-opening following the second form close
event, but that seems a bit drastic and heavy handed.

TIA

Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default UserForm Update on the Fly

Nigel..

hide the original form instead of unloading it.
then your second form can access all the controls on the
first form.

'code for userform1
'this form has 2 textboxes and 1 commandbutton
Private Sub CommandButton1_Click()
Load UserForm2
UserForm2.TextBox1 = Me.TextBox1
Me.Hide
UserForm2.Show
End Sub


'code for userform2
'this form has 1 textbox and 1 commandbutton
Private Sub CommandButton1_Click()
'indirect reference for "on the fly controls"
UserForm1.Controls("TextBox2") = Me.TextBox1
Unload Me
UserForm1.Show
End Sub



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Nigel" wrote:

Using (xl97) I have a userform that opens after a user event to
display some data extracted from a worksheet. On this form is another
control button that is enabled (or not) depending on the state of the
extracted data displayed on the form.

If the control button on the first form is enabled and clicked a
second form opens allowing the user to change some data, which in turn
affects the values on the sheet being the same data used on the first
form. Closing the second form reveals the first form again but of
course the data and the state of the enabling button has not changed.

Is there anyway that the first form can dynamically change in response
to the users action on the second form?

I had thought about closing and re-opening following the second form
close event, but that seems a bit drastic and heavy handed.

TIA

Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers
- Total Privacy via Encryption =---


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default UserForm Update on the Fly

keepITcool

Thanks for the tip - of course hiding it releases the form !
It now works great

Cheers
Nigel

"keepitcool" wrote in message
...
Nigel..

hide the original form instead of unloading it.
then your second form can access all the controls on the
first form.

'code for userform1
'this form has 2 textboxes and 1 commandbutton
Private Sub CommandButton1_Click()
Load UserForm2
UserForm2.TextBox1 = Me.TextBox1
Me.Hide
UserForm2.Show
End Sub


'code for userform2
'this form has 1 textbox and 1 commandbutton
Private Sub CommandButton1_Click()
'indirect reference for "on the fly controls"
UserForm1.Controls("TextBox2") = Me.TextBox1
Unload Me
UserForm1.Show
End Sub



keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Nigel" wrote:

Using (xl97) I have a userform that opens after a user event to
display some data extracted from a worksheet. On this form is another
control button that is enabled (or not) depending on the state of the
extracted data displayed on the form.

If the control button on the first form is enabled and clicked a
second form opens allowing the user to change some data, which in turn
affects the values on the sheet being the same data used on the first
form. Closing the second form reveals the first form again but of
course the data and the state of the enabling button has not changed.

Is there anyway that the first form can dynamically change in response
to the users action on the second form?

I had thought about closing and re-opening following the second form
close event, but that seems a bit drastic and heavy handed.

TIA

Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers
- Total Privacy via Encryption =---






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
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
Update one worksheet tab to automatically update all other tabs? shoechic1 Excel Worksheet Functions 1 May 24th 09 03:55 PM
Data Validation lists update orginal cell with list update [email protected] Excel Worksheet Functions 3 July 11th 08 07:56 AM
i want to update one excel file the other one update automaticaly Basant New Users to Excel 1 December 16th 06 12:50 AM
UserForm CR Excel Discussion (Misc queries) 1 August 10th 05 10:26 PM
Date update on data update Chris Thompson Excel Programming 3 August 22nd 03 06:40 PM


All times are GMT +1. The time now is 04:08 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"