Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default returning pivottable object from a range object

Hi there,

Is there anyway to return a pivottable object from a
range object?

Thanks,
Grant.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default returning pivottable object from a range object

assume rng is the rng object

rng.PivotTable.name

from help:
Returns a PivotTable object that represents the PivotTable containing the
upper-left corner of the specified range. Read-only.

or you can try something along the lines of :

for each pvt in rng.Parent.PivotTables
if not Intersect(rng,pvt.TableRange2) is nothing then
msgbox pvt.Name & " found "
exit for
end if
Next

--
Regards,
Tom Ogilvy


"Grant" wrote in message
...
Hi there,

Is there anyway to return a pivottable object from a
range object?

Thanks,
Grant.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default returning pivottable object from a range object

Awesome! Thanks very much.


-----Original Message-----
assume rng is the rng object

rng.PivotTable.name

from help:
Returns a PivotTable object that represents the

PivotTable containing the
upper-left corner of the specified range. Read-only.

or you can try something along the lines of :

for each pvt in rng.Parent.PivotTables
if not Intersect(rng,pvt.TableRange2) is nothing then
msgbox pvt.Name & " found "
exit for
end if
Next

--
Regards,
Tom Ogilvy


"Grant" wrote in

message
...
Hi there,

Is there anyway to return a pivottable object from a
range object?

Thanks,
Grant.



.

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
Returning range object from custom functions agarwaldvk[_9_] Excel Programming 3 August 1st 04 10:46 PM
trouble returning a workbook level Name object Brian Murphy Excel Programming 32 May 12th 04 07:47 AM
Range object to Array object conversion Myrna Larson[_2_] Excel Programming 1 August 1st 03 02:27 AM
Range object to Array object conversion Alan Beban[_3_] Excel Programming 0 August 1st 03 01:24 AM
Range object to Array object conversion Tom Ogilvy Excel Programming 0 August 1st 03 12:16 AM


All times are GMT +1. The time now is 05:46 PM.

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

About Us

"It's about Microsoft Excel"