Change Functions Confusing

J

Joe W

I've tried these three fuctions below plus several others). When I change a
field nothing happens. I simply want a function to run when there is a
change in a given field on a worksheet in a workbook. What am I doing
wrong?

Thanks,

Joe W


Workbook_SheetChange(ByVal Sh As Object, ByVal Source As Range)
MsgBox "aaa"
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "aaa"
End Sub

'Private Sub Worksheet_Change(ByVal Target As Range)
' MsgBox "aaa"
'End Sub
 
R

RichardSchollar

Joe

What do you have your security settings set to? Macros may be disabled
by default if set to High/Very High. Do you have those macros inserted
in the ThisWorkbook and worksheet modules or in a standard module?
Private Sub Workbook_SheetChange needs to go into the ThisWorkbook
module, the other two need to go into the relevant sheet module.

Richard
 

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

Top