Beste
Onderstaande code zit in een userform en werkt
dit zijn allemaal command buttons op die userform
Als je op die buttons klikt zou hij in een andere userform die moeten invullen in een textvak
Is er een methode om dit makkelijker te doen in plaats van met afzonderlijke click events?
Onderstaande code zit in een userform en werkt
dit zijn allemaal command buttons op die userform
Als je op die buttons klikt zou hij in een andere userform die moeten invullen in een textvak
Is er een methode om dit makkelijker te doen in plaats van met afzonderlijke click events?
Code:
Private Sub CommandButton1_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton1.Caption
.TextBox5.Value = "HO entrance East / Reception contractors West"
End With
Unload Me
End Sub
Private Sub CommandButton2_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton2.Caption
.TextBox5.Value = "N21"
End With
Unload Me
End Sub
Private Sub CommandButton3_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton3.Caption
.TextBox5.Value = "Meetingrooms GF & -1S"
End With
Unload Me
End Sub
Private Sub CommandButton4_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton4.Caption
.TextBox5.Value = "First aid"
End With
Unload Me
End Sub
Private Sub CommandButton5_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton5.Caption
.TextBox5.Value = "Restaurant"
End With
Unload Me
End Sub
Private Sub CommandButton6_Click()
With userform_key
.TextBox4.Value = Keys_HO.CommandButton6.Caption
.TextBox5.Value = "Security Room"
End With
Unload Me
End Sub