![]() |
Msg Box to appear when page selection changes in a Pivot Table
Use the WorksheetSelction Change event and check the target range....
Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub If this post helps click Yes --------------- Jacob Skaria "Mustang" wrote: Does anyone know how I can create a macro that will run each time the Page selection changes in my Pivot Table to display a message box? I basically want to remind them to copy a total amount to another sheet. Many thanks |
Msg Box to appear when page selection changes in a Pivot Table
Hi thanks for your speedy reply.
My knowledge of VB is minimal. Can you give me a bit more guidance as to what to put in the code please. I am a bit lost here sorry. "Jacob Skaria" wrote: Use the WorksheetSelction Change event and check the target range.... Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub If this post helps click Yes --------------- Jacob Skaria "Mustang" wrote: Does anyone know how I can create a macro that will run each time the Page selection changes in my Pivot Table to display a message box? I basically want to remind them to copy a total amount to another sheet. Many thanks |
Msg Box to appear when page selection changes in a Pivot Table
Assuming my Range as A1:C3 of Sheet1; copy the below code to the Selection
Change event. Launch VBE using Alt+F11 from workbook. From the left treeview double click Sheet1(Sheet1) Drop down to get the 'Worksheet' 'Selection Change' event paste the code...so as to look like. Select any cell from A1:C3 in Sheet1... Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Application.Intersect(Target, Range("$A$1:C$3")) Is Nothing Then MsgBox "OK" End If End Sub If this post helps click Yes --------------- Jacob Skaria "Mustang" wrote: Hi thanks for your speedy reply. My knowledge of VB is minimal. Can you give me a bit more guidance as to what to put in the code please. I am a bit lost here sorry. "Jacob Skaria" wrote: Use the WorksheetSelction Change event and check the target range.... Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub If this post helps click Yes --------------- Jacob Skaria "Mustang" wrote: Does anyone know how I can create a macro that will run each time the Page selection changes in my Pivot Table to display a message box? I basically want to remind them to copy a total amount to another sheet. Many thanks |
All times are GMT +1. The time now is 03:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com