Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Insert excel sheet in a powerpoint presentation

Hello,

I am trying to insert an excel worksheet in a powerpoint presentation as an
OLE object from an access tool.

What I am doing is:

Dim extbl As Object

Set extbl =
ObjPowerPoint.ActivePresentation.Slides(1).Shapes. AddOLEObject(Left:=120,
Top:=110, Width:=480, Height:=320, ClassName:="Excel.Sheet", Link:=msoFalse,
DisplayAsIcon:=msoTrue, IconIndex:=1)

Myworksheet.RangeMyworksheet.Cells(1, 1), Myworksheet.Cells(100, 8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

If I run it in debug mode line by line, it works. But if I allow to run it
alone, the inserted worksheet is empty.

Could anyone help me with this?

Best regards,

Raquel


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Insert excel sheet in a powerpoint presentation

Don't know if the typo is only in your posting, but you are missing a
parentheses in this:

Myworksheet.Range* ( *Myworksheet.Cells(1, 1), Myworksheet.Cells(100,
8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

See between the asterisks.




"Raquel" wrote:

Hello,

I am trying to insert an excel worksheet in a powerpoint presentation as an
OLE object from an access tool.

What I am doing is:

Dim extbl As Object

Set extbl =
ObjPowerPoint.ActivePresentation.Slides(1).Shapes. AddOLEObject(Left:=120,
Top:=110, Width:=480, Height:=320, ClassName:="Excel.Sheet", Link:=msoFalse,
DisplayAsIcon:=msoTrue, IconIndex:=1)

Myworksheet.RangeMyworksheet.Cells(1, 1), Myworksheet.Cells(100, 8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

If I run it in debug mode line by line, it works. But if I allow to run it
alone, the inserted worksheet is empty.

Could anyone help me with this?

Best regards,

Raquel


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Insert excel sheet in a powerpoint presentation

JLGWhiz,

thanks a lot for looking it. The parentheses are not missing, just a
copy/paste issue...

I don't know which can be the problem... I am deseperated.

Raquel

"JLGWhiz" wrote:

Don't know if the typo is only in your posting, but you are missing a
parentheses in this:

Myworksheet.Range* ( *Myworksheet.Cells(1, 1), Myworksheet.Cells(100,
8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

See between the asterisks.




"Raquel" wrote:

Hello,

I am trying to insert an excel worksheet in a powerpoint presentation as an
OLE object from an access tool.

What I am doing is:

Dim extbl As Object

Set extbl =
ObjPowerPoint.ActivePresentation.Slides(1).Shapes. AddOLEObject(Left:=120,
Top:=110, Width:=480, Height:=320, ClassName:="Excel.Sheet", Link:=msoFalse,
DisplayAsIcon:=msoTrue, IconIndex:=1)

Myworksheet.RangeMyworksheet.Cells(1, 1), Myworksheet.Cells(100, 8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

If I run it in debug mode line by line, it works. But if I allow to run it
alone, the inserted worksheet is empty.

Could anyone help me with this?

Best regards,

Raquel


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Insert excel sheet in a powerpoint presentation

Sorry I can't help with the code. I usually do mine manually and avoid those
kinds of problems.

"Raquel" wrote:

JLGWhiz,

thanks a lot for looking it. The parentheses are not missing, just a
copy/paste issue...

I don't know which can be the problem... I am deseperated.

Raquel

"JLGWhiz" wrote:

Don't know if the typo is only in your posting, but you are missing a
parentheses in this:

Myworksheet.Range* ( *Myworksheet.Cells(1, 1), Myworksheet.Cells(100,
8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

See between the asterisks.




"Raquel" wrote:

Hello,

I am trying to insert an excel worksheet in a powerpoint presentation as an
OLE object from an access tool.

What I am doing is:

Dim extbl As Object

Set extbl =
ObjPowerPoint.ActivePresentation.Slides(1).Shapes. AddOLEObject(Left:=120,
Top:=110, Width:=480, Height:=320, ClassName:="Excel.Sheet", Link:=msoFalse,
DisplayAsIcon:=msoTrue, IconIndex:=1)

Myworksheet.RangeMyworksheet.Cells(1, 1), Myworksheet.Cells(100, 8)).Copy
extbl.OLEFormat.Object.Worksheets(1).Range("A1")

If I run it in debug mode line by line, it works. But if I allow to run it
alone, the inserted worksheet is empty.

Could anyone help me with this?

Best regards,

Raquel


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
Powerpoint presentation that reads from Excel sheet alstal Excel Programming 0 December 22nd 05 02:49 PM
Open Powerpoint Presentation via Excel VBA code hurlbut777 Excel Programming 3 January 7th 05 12:42 AM
How do I insert an Excel file into a PowerPoint Presentation slid. Barb Excel Worksheet Functions 1 December 11th 04 04:23 PM
How do I insert an Excel file into a PowerPoint Presentation slid. Barb Excel Discussion (Misc queries) 1 December 11th 04 04:22 PM
Creating a powerpoint presentation from MS-Excel Shilps[_2_] Excel Programming 3 August 1st 04 03:47 AM


All times are GMT +1. The time now is 03:08 AM.

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"