Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default marco after selection in PV table

can i build a marco to run automatically after making a selection of field
in pivot table?

dennis


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default marco after selection in PV table

Dennis,

Quite simply ... use

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
Run ("TheNameofYourMacro")
Application.EnableEvents = True
End Sub

HTH
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default marco after selection in PV table

Dear Carim,

i save the code in sheet1, my table is in sheet1. but the marco didn't run.
can u help again?

Dennis

"Carim" wrote in message
ups.com...
Dennis,

Quite simply ... use

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
Run ("TheNameofYourMacro")
Application.EnableEvents = True
End Sub

HTH
Carim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default marco after selection in PV table

Dennis,

Just type =Now() in any cell of your sheet1 ...

HTH

Carim

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default marco after selection in PV table

Carim,

i am sorry that it didn't work as i follow your instruction. do i miss
anything or did something wrong?

Dennis

dennis
"Carim" wrote in message
ps.com...
Dennis,

Just type =Now() in any cell of your sheet1 ...

HTH

Carim





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default marco after selection in PV table

Because the pivot table is an object, its refresh does not trigger a
worksheet calculate event, therefore you need a volatile function such
as now() or any function linked to the result of your pivot table being
recalculated such as
=MATCH("Grand Total",A:A,1) to fire the event...

HTH

Carim

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default marco after selection in PV table

Dear Carim,

I tried your formula but the Marco did'nt run. Can you explain more
specific? I am not familar to VBA. Thanks again!

Dennis

"Carim" wrote in message
ups.com...
Because the pivot table is an object, its refresh does not trigger a
worksheet calculate event, therefore you need a volatile function such
as now() or any function linked to the result of your pivot table being
recalculated such as
=MATCH("Grand Total",A:A,1) to fire the event...

HTH

Carim



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default marco after selection in PV table

Dennis,

Make sure your Excel is set with automatic calculation ...
Tools Option Calculation Automatic

Otherwise, I am sorry I cannot help you out anymore ...

HTH

Carim

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default marco after selection in PV table

it works now. thanks. but i didn't change any of the setting in my excel. ??

Dennis

"Carim" wrote in message
oups.com...
Dennis,

Make sure your Excel is set with automatic calculation ...
Tools Option Calculation Automatic

Otherwise, I am sorry I cannot help you out anymore ...

HTH

Carim



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default marco after selection in PV table

Glad it is working ...
and glad I could help

Cheers
Carim

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Selection Sandeep Jangra[_2_] Excel Discussion (Misc queries) 2 October 10th 08 05:32 PM
specify cell selection in a marco chubach Excel Discussion (Misc queries) 3 February 8th 07 11:47 PM
Selection table Mike F. Excel Discussion (Misc queries) 1 September 27th 05 07:19 AM
pivot table selection bayanbaru Excel Worksheet Functions 0 June 28th 05 01:21 AM
Marco: Pivot Table Tim Excel Programming 2 April 21st 05 04:53 AM


All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"