Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
Dear all,
I need to call a macro when data is pasted into a particular cell on particular worksheet. I am having a few problems with this, any hel would be greatly appretiated. Many thanks, To -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
Use a worksheet change event by right click on sheet tabview codeinsert
thismodifysave Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$F$1" Then Exit Sub Call mysub End Sub Sub mysub() MsgBox "Hi" End Sub -- Don Guillett SalesAid Software "lopsided" wrote in message ... Dear all, I need to call a macro when data is pasted into a particular cell on a particular worksheet. I am having a few problems with this, any help would be greatly appretiated. Many thanks, Tom --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
Hi Don,
That worked fine - i didnt realise this code needed to go in the worksheet code, i kept trying to put coding in a separate module! Many thanks, Tom --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
glad to help. UDF functions need to go in a general module. In the
ThisWorkbook module there is code that will act of EACH sheet in the workbook. Take a look. -- Don Guillett SalesAid Software "lopsided" wrote in message ... Hi Don, That worked fine - i didnt realise this code needed to go in the worksheet code, i kept trying to put coding in a separate module! Many thanks, Tom --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
You need to use the worksheet change event (doubleclick the sheet name
in VB Editor) :- '------------------------------------------------ Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$A$1" Then MsgBox ("change") End Sub '------------------------------------------------- lopsided wrote in message ... Dear all, I need to call a macro when data is pasted into a particular cell on a particular worksheet. I am having a few problems with this, any help would be greatly appretiated. Many thanks, Tom --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to call a macro from a worksheet event?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheet function in event macro | Excel Worksheet Functions | |||
how to call the event of other worksheet | Excel Worksheet Functions | |||
call a function on control click event | Excel Discussion (Misc queries) | |||
call a sub with arguments from Worksheet_FollowHyperlink event | Excel Programming | |||
macro to apply worksheet event to active worksheet | Excel Programming |