Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Thanks for your response, but I dont get it. So it looks like this now: Public Sub calc(ByRef btn as Object) btn.Caption = "Something" End Sub Private Sub CommandButton1_Click() calc(CommandButton1) End Sub Private Sub CommandButton2_Click() calc(CommandButton2) End Sub Maybe someone can explain it to me in more detail, because Im very new to VBA. Commented Feb 21, 2014 at 7:43
  • changed it a bit, but don't how much easier it could explain it :), If it still doesn't make sense email me your file and I can take a look at it for you Commented Feb 21, 2014 at 7:47
  • thank you very much! It works. I need to read some more about the Call keyword. Commented Feb 21, 2014 at 7:52
  • np, glad I could help Commented Feb 21, 2014 at 7:56