LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Novice question: I cannot get the immediate window to work

I am trying to learn VBA from a STEP BY STEP written by Reed Jacobson.
He encourages using the Immediate Window because he claims you can see the
progress as you code.
I am copying his code verbatim. For example, in the current practice, I have
the following Macro shell;

Sub PivotSet Style()
Dim pt as Pivottable
Dim ts as Tablestyle
Set pt=ActiveCell.Pivottable
End sub

I initialize this by pressing F8 three times, and then I type the following
in the immediate window:
Set
ts=ActiveWorkbook.Tablestyles("PivotStyleDark2").D uplicate("NewPivotStyle")
pt.Tablestyle2=ts.Name

(Note: the "Set ts= ActiveWorkbook..." statement above, is all on one line
in the immediate window)

When I get to the last line I get an "Object Required" error message.

I've checked the code and the instructions, and I cannot see anything
different from what I have copied.

What am I doing wrong?
 
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
A macro code question from a novice Richard Excel Discussion (Misc queries) 2 December 24th 07 07:22 PM
Novice formula question Denise Excel Discussion (Misc queries) 10 November 7th 07 08:43 AM
Novice IF and COUNT question (I think) Robin Excel Worksheet Functions 5 October 3rd 07 11:00 PM
drop down list - a question from novice striker_69 Excel Discussion (Misc queries) 5 September 19th 05 06:59 PM
Novice VBA question... Alex Excel Programming 2 July 22nd 04 06:03 PM


All times are GMT +1. The time now is 02:04 AM.

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"