Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Debug.Print in a WITH procedure?
I am creating a subroutine to dump pivot table info into the Immediate window
using Debug.Print. I would like to use the WITH procedure...how do I do it? I'm not too familiar with the intricacies of the WITH syntax. This is what I'm looking for: If ShowMeAll Then Debug.Print With WSheet.PivotTables(iIndex).PivotCache "BackgroundQuery=" & .BackgroundQuery & "; " "EnableRefresh= " & .EnableRefresh End With End If Thus the output I would see would be: BackgroundQuery= False; EnableRefresh = True My output will actually be bigger as I'll be pulling more PivotCache info but if I can just get the beginning started... Thanks! -- Toby Erkson Oregon, USA Excel 2003 in Windows XP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Debug.Print in a WITH procedure?
You need a Debug.Print statement on every line that is to be
printed to the Immediate window. With WSheet.PivotTables(iIndex).PivotCache Debug.Print "BackgroundQuery=" & ..BackgroundQuery & "; " Debug.Print "EnableRefresh= " & .EnableRefresh End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Toby Erkson" wrote in message ... I am creating a subroutine to dump pivot table info into the Immediate window using Debug.Print. I would like to use the WITH procedure...how do I do it? I'm not too familiar with the intricacies of the WITH syntax. This is what I'm looking for: If ShowMeAll Then Debug.Print With WSheet.PivotTables(iIndex).PivotCache "BackgroundQuery=" & .BackgroundQuery & "; " "EnableRefresh= " & .EnableRefresh End With End If Thus the output I would see would be: BackgroundQuery= False; EnableRefresh = True My output will actually be bigger as I'll be pulling more PivotCache info but if I can just get the beginning started... Thanks! -- Toby Erkson Oregon, USA Excel 2003 in Windows XP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Debug.Print in a WITH procedure?
It should be:
If ShowMeAll Then With WSheet.PivotTables(iIndex).PivotCache Debug.Print "BackgroundQuery=" & .BackgroundQuery & "; " Debug.Print "EnableRefresh= " & .EnableRefresh End With End If "Toby Erkson" wrote in message ... I am creating a subroutine to dump pivot table info into the Immediate window using Debug.Print. I would like to use the WITH procedure...how do I do it? I'm not too familiar with the intricacies of the WITH syntax. This is what I'm looking for: If ShowMeAll Then Debug.Print With WSheet.PivotTables(iIndex).PivotCache "BackgroundQuery=" & .BackgroundQuery & "; " "EnableRefresh= " & .EnableRefresh End With End If Thus the output I would see would be: BackgroundQuery= False; EnableRefresh = True My output will actually be bigger as I'll be pulling more PivotCache info but if I can just get the beginning started... Thanks! -- Toby Erkson Oregon, USA Excel 2003 in Windows XP |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Debug.Print in a WITH procedure?
Rats, that's what I was thinking I'd have to do. No problem though, thx!
"Chip Pearson" wrote in message ... You need a Debug.Print statement on every line that is to be printed to the Immediate window. With WSheet.PivotTables(iIndex).PivotCache Debug.Print "BackgroundQuery=" & .BackgroundQuery & "; " Debug.Print "EnableRefresh= " & .EnableRefresh End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Debug.Print in a WITH procedure?
More to what I wanted (before gobs of errors cropped up with the additional
items I inserted): If ShowMeAll Then With WSheet.PivotTables(iIndex).PivotCache Debug.Print "BackgroundQuery=" & .BackgroundQuery & "; " _ & "EnableRefresh= " & .EnableRefresh End With End If Thanks for the help! I'm well on my way :-) Toby "Bryan Dickerson" wrote in message ... It should be: If ShowMeAll Then With WSheet.PivotTables(iIndex).PivotCache Debug.Print "BackgroundQuery=" & .BackgroundQuery & "; " Debug.Print "EnableRefresh= " & .EnableRefresh End With End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop a Procedure from another procedure | Excel Discussion (Misc queries) | |||
Help required to debug mailmerge procedure | Excel Programming | |||
Calling a procedure in a procedure | Excel Programming | |||
Debug.Print | Excel Programming |