Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
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
Stop a Procedure from another procedure Ayo Excel Discussion (Misc queries) 1 October 30th 08 01:42 AM
Help required to debug mailmerge procedure JRB Excel Programming 2 October 23rd 04 07:39 PM
Calling a procedure in a procedure N10 Excel Programming 2 August 18th 04 12:49 AM
Debug.Print ExcelMonkey[_80_] Excel Programming 1 February 6th 04 04:04 PM


All times are GMT +1. The time now is 06:16 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"