Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Firing Event in another user form

I have a textbox in a UserForm where I add a string and when the entry is complete the After_Update event fires.

' In UserForm1
Private Sub TextBox1_AfterUpdate()
MsgBox "After Update"
' Do stuff here
End Sub

What I'm trying to accomplish is to open a second UserForm so that I can search in a ListBox for the proper string to place in that original TextBox.

' From UserForm2
Private Sub CommandButton1_Click()
Unload Me
UserForm1.TextBox1 = Label1.Caption ' Populate TextBox1 with this result
End Sub

All works well with getting the TextBox populated with what I need to but I can't get the After_Update event to fire.

Thanks in advance for your help.

John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Firing Event in another user form

On Friday, June 21, 2013 9:54:49 AM UTC-4, wrote:
I have a textbox in a UserForm where I add a string and when the entry is complete the After_Update event fires.



' In UserForm1

Private Sub TextBox1_AfterUpdate()

MsgBox "After Update"

' Do stuff here

End Sub



What I'm trying to accomplish is to open a second UserForm so that I can search in a ListBox for the proper string to place in that original TextBox.



' From UserForm2

Private Sub CommandButton1_Click()

Unload Me

UserForm1.TextBox1 = Label1.Caption ' Populate TextBox1 with this result

End Sub



All works well with getting the TextBox populated with what I need to but I can't get the After_Update event to fire.



Thanks in advance for your help.



John


The after event in forms is text boxes is un-reliable. Instead, have the user press a command button and have it do the actions you want.

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
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
Click event on menu item is lost after first time firing of the event [email protected] Excel Programming 1 April 2nd 07 01:25 PM
Event when a user form is loaded shashi1515[_10_] Excel Programming 4 March 28th 06 09:34 PM
keyboard event in user form gpjb Excel Programming 3 June 27th 05 11:13 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


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

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"