Start macro automatic

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

Guest

I want to know how to start a macro automatic. Not when I open Excel but when
I have an Excelfile open.
For example: If cell B3=1 then start macro "Start clock"
 
I suspect you're hinting towards something like:

'============================
Private Sub Worksheet_SelectionChange(ByVal target As Range)

If target.Address = "$B$1" And target.Value = 1 Then
StartClock
End If

End Sub
============================

This will have to be put in the code module behind the relevent
worksheet (and I think the macro StartClock will need to have its scope
extended to Public if it is in a standard module)

Hope this helps
J
 

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