View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Kuo[_3_] Sam Kuo[_3_] is offline
external usenet poster
 
Posts: 86
Default Shorter way to create multiple identical Event Procedures?

Hi all,

I have 10 textboxes (namely txtPost1, txtPost2, ..., txtPost10) which I want
to assign the event procedure below to. I just wonder if there might be a
short way to do than copy and paste the code 10 times?

Private Sub txtPost1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' Update work duration (by calling macro UpdateDuration)
UpdateDuration ("Post")
End Sub