Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivottable or querytable
I want to determine if the current selection is a pivottable,
querytable or neither. Any ideas here? Thanks! Dave |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivottable or querytable
You could check the active cell:
Sub CheckPivotAndQuery() Dim strPivot As String Dim strQuery As String On Error Resume Next strPivot = ActiveCell.PivotTable.Name strQuery = ActiveCell.QueryTable.Name On Error GoTo 0 If strPivot = "" And strQuery = "" Then MsgBox "No pivot table and no query" Else If strPivot < "" Then MsgBox strPivot Else MsgBox strQuery End If End If End Sub Dave wrote: I want to determine if the current selection is a pivottable, querytable or neither. Any ideas here? Thanks! Dave -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivottable or querytable
Exactly what I needed. Thanks Debra!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a PivotTable w/o selecting data in an existing PivotTable | Excel Discussion (Misc queries) | |||
How to use QueryTable with insertion sql | Excel Programming | |||
PivotTable - PivotTable Field name is not valid - error! | Excel Programming | |||
Querytable | Excel Programming | |||
MS QUERY w/out querytable | Excel Programming |