Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
i need a marco runs automatically after a selection in page area (i wonder
if it is called page area). is it possible? how to write the code? example: there are mutiple shops sales data in a pivot table. i want the marco to run automatically after i select a different shop. since there are 2 tables in one sheet. i need to merge 2 tables after selecting a different shop? please help! Dennis |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
Dennis,
Have you sorted out your "custom sort" ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
thanks Carim! it all works. really appreciate for your kind assistance.
"Carim" wrote in message oups.com... Dennis, Have you sorted out your "custom sort" ? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
Hi Dennis,
The solution provided by Carim is appropriate for yor problem. To run marco automatically after a selection: Call the macro in "Worksheet_SelectionChange" event. Here even you can restrict the macro call to particular range by checking the Target parameter of event. Regards. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
Dear Vinit,
Since I am not familar to VBA. Can you explain more specific? The selection is in range b2 and the marco name is marco1. Dennis "Vinit" wrote in message oups.com... Hi Dennis, The solution provided by Carim is appropriate for yor problem. To run marco automatically after a selection: Call the macro in "Worksheet_SelectionChange" event. Here even you can restrict the macro call to particular range by checking the Target parameter of event. Regards. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
run a marco automatically
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 2 and Target.Row= 2 Then 'For B2 ShowCellValue' macro1 End If End Sub Sub ShowCellValue() 'My Macro. macro1 in ur case MsgBox "The value =" & ActiveCell.Value End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Marco | Excel Discussion (Misc queries) | |||
Marco Help | Excel Discussion (Misc queries) | |||
Marco | New Users to Excel | |||
Can it be done by marco? | Excel Programming | |||
marco | Excel Programming |