Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default updating userform

2 part question:

a. What events should I be using to update between my userform and
worksheet? Is it ever good practice to use the ControlSource property for
say a textbox?

b. How can I validate multiple textbox's with the same code? For example:
Private Sub TextBox1_Change()
Call Update
End Sub

Private Sub TextBox2_Change()
Call Update
End Sub

In Sub Update(), how do I reference which text box changed?

thanks,
Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default updating userform

The ActiveControl object will always reference the control that is currently
active. Since your Sub is being called from a control's event procedure,
then that control must currently be active, so ActiveControl will be
referencing it.

Rick


"steve" wrote in message
...
2 part question:

a. What events should I be using to update between my userform and
worksheet? Is it ever good practice to use the ControlSource property for
say a textbox?

b. How can I validate multiple textbox's with the same code? For
example:
Private Sub TextBox1_Change()
Call Update
End Sub

Private Sub TextBox2_Change()
Call Update
End Sub

In Sub Update(), how do I reference which text box changed?

thanks,
Steve


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default updating userform

Maybe start he

http://www.excel-vba.com/excel-vba-contents.htm

"steve" wrote:

2 part question:

a. What events should I be using to update between my userform and
worksheet? Is it ever good practice to use the ControlSource property for
say a textbox?

b. How can I validate multiple textbox's with the same code? For example:
Private Sub TextBox1_Change()
Call Update
End Sub

Private Sub TextBox2_Change()
Call Update
End Sub

In Sub Update(), how do I reference which text box changed?

thanks,
Steve

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
userform for updating records Terry Excel Discussion (Misc queries) 2 August 27th 08 04:16 PM
Help !, problem updating data through userform ! Pierre[_18_] Excel Programming 1 December 10th 07 02:38 PM
Userform updating via spinbutton [email protected] Excel Programming 0 September 27th 06 08:54 PM
Userform updating Richard Excel Programming 3 May 21st 04 03:37 PM
Updating .tag in Userform Control in VBA Chan[_3_] Excel Programming 1 August 20th 03 07:08 PM


All times are GMT +1. The time now is 10:51 AM.

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

About Us

"It's about Microsoft Excel"