Hello everybody, thank you for reading, i'm new at this forum. Hope i can help to somebody sometime.
Now i have a quiestion.
I have a form with 26 buttons each one has a letter as a caption, ej. A,B,C,D and so on, I use them for call a function that performs a search with the caption as a variable.
So the code for the 26 buttons is the same except for de caption.
Private Sub BtnA_Click()
Letra = Me.BtnA.Caption
CargaTiendas (Letra)
End Sub
Private Sub BtnB_Click()
Letra = Me.BtnB.Caption
CargaTiendas (Letra)
End Sub
is there a way to use just one function or routine that perform this? i do not want to have the same code for 26 buttons. I want some like this
Private Sub BtnB_Click() EVENT FOR ALL THE 26 BUTTONS
Letra = CAPTION OF THE PRESSED BUTTON
CargaTiendas (Letra)
End Sub
Hope this quiestion helps any body else, thank you for reading
Bookmarks