Bill Martin -- (Remove NOSPAM from address)
Guest
Re: Event Macro
stevepain wrote:
> Dear all,
>
> I've got a spreadsheet that produces summary information based upon a
> table that is updated weekly by a supplier, and then copy and pasted
> into the summary spreadsheet.
> I would like to run a macro that I currently have assigned to a button
> on one of the sheets automatically when the data table from the
> supplier is updated. Thus removing the need for the user to click the
> button everytime the information (and subsequently the report it
> generates) is updated.
>
> How do I do this? I think I need some code somewhere, but I'm a bit of
> a code novice!
>
> Thanks,
>
> Steve
>
>
Here's a snippet of code demonstrating what you want I believe:
Private Sub worksheet_change(ByVal Target As Excel.range)
MsgBox "Cell Changed"
End Sub
You need to place this not in the "Modules" as you normally do, but the
"Microsoft Excel Objects" for the specific sheet you want to monitor for changes.
Good luck...
Bill
Bookmarks