invoke a function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to invoke a function(fx) once a user clicks on button1
ex. Application.Worksheetfinction.CountA -- Is this correct?
Thanks...
 
assume button1 is a commandbutton named CommandButton1. Then double click
on it in design mode to be taken to the click event

Private Sub Commandbutton1_click()

End Sub

Put in your function there

Private Sub Commandbutton1_click()
msgbox "Count is " & _
application.WorksheetFunction.CountA(Selection)
End Sub
 
Tom, what if i just want the function to pop up without a selection range.
Ex. I just want the "Solver" to come up on the screen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top