Need help on continuous running of a macro

cushal

New Member
Joined
Mar 24, 2009
Messages
9
Hello all,

I have an elementary level macro which basically opens a hyperlink when the number in a cell changes. The problem for me is though that I cant get the macro to be running continuously and it gets executed only when I run it myself each and every time. I basically need for the macro to be constantly on and execute the hyperlink each time the cell value changes. I looked up on the internet and it asked me to access the private Worksheet object and put in the code in Private Sub Worksheet_Change(ByVal Target As Range). How exactly do I access this object? Any help would be greatly appreciated.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Right-click the sheet name, go to view code.

Inside the following tags, put your code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

Note that whatever cell(s) was (were) changed are 'Target'. If you only want to, for instance, have your macro activate when Cell A1 is changed, you can add the following around your code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target,Range("A1")) Is Nothing Then
        'Insert Macro Here
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,222,383
Messages
6,165,660
Members
451,983
Latest member
Raph24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top