Thread: Excel VB Code
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Excel VB Code

When you write ActiveWindow.Selection....inside VBA running from an Excel
workbook, the 'ActiveWindow' is the active window for Excel, not your
PowerPoint presentation. You're not showing enough of your code to make any
specific suggestions.

Steve



"Ranjit kurian" wrote in message
...
Hi

I have created a excel vb code to copy the pivots from excel to powerpoint
slide.

The problem iam facing is, unable to create a Textbox in the same active
powerpoint slide.

Could you please help me to write an excel vb code in excel, so that i can
add a text box to the active window powerpoint slide.

Below is the code i tried in excel macro,

while running its asking for an object.

Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide
Dim slidecount As Long
Dim ans
Dim answer As String
Dim RangetoPaste As Range
Dim PPShape As Shape

ActiveWindow.Selection.SlideRange.Shapes.AddTextbo xmsoTextOrientationHorizontal,
50, 50, 400, 24).Select
ActiveWindow.Selection.ShapeRange.TextFrame.Wordwr ap