After Update event doesn't work

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,705
Code:
Private Sub cmdPrimary_Click()
    txtPrimary.text = GetFolder("Select the Primary Folder")
End Sub

Private Sub txtPrimary_AfterUpdate()
Stop
End Sub

The GetFolder function returns a value which txtPrimary displays.
It isn't assigned a value until then but the After Update event doesn't fire.
Unless I type something into the text box. Is that how it's supposed to be ?
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,705
I made it work with

Code:
Private Sub cmdPrimary_Click()
    txtPrimary.text = GetFolder("Select the Primary Folder")
    txtPrimary_AfterUpdate
End Sub

Isn't that plain crazy ?
 
Last edited:

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,413
Try:
Code:
Private Sub cmdPrimary_Click()
    txtPrimary.Text = GetFolder("Select the Primary Folder")
    txtPrimary.SetFocus
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,108,707
Messages
5,524,424
Members
409,577
Latest member
Dwg

This Week's Hot Topics

Top