Re: Open multiple excel spreadsheet from ppt VBA
- From: T Lavedas <tglbatch@xxxxxxx>
- Date: Thu, 8 May 2008 14:23:05 -0700 (PDT)
On May 8, 3:44 pm, Lily <L...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I used
set wksheet1=XLApplication.workbooks.open(excel filename as
string).worksheet("ws1")
and it did work.
But I don't know how to open another worksheet from the same excel file.
thanks,
Here this worked for me ...
with createobject("excel.application")
set oWB1 = .workbooks.open(sXLfilename)'
oWB1.worksheets(1).activate
.visible = true
end with
msgbox "pause"
with createobject("excel.application")
set oWB2 = .workbooks.open(sXLfilename)'
oWB2.worksheets(2).activate
.visible = true
end with
Entirely different instatiations of the Excel.Application object are
needed to get simultaneous displays of different sheets in a
workbook. Only the first one you open will be editable. Later
versions are opened Read-only. Also, they will appear one over the
other (the second will hide the first, until it is moved, etc.). I
didn't take the time to figure out how to move them about.
HTH,
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
.
- Follow-Ups:
- References:
- Open multiple excel spreadsheet from ppt VBA
- From: Lily
- Open multiple excel spreadsheet from ppt VBA
- Prev by Date: RE: Powerpoint textbox copy from slide to slide
- Next by Date: RE: Powerpoint textbox copy from slide to slide
- Previous by thread: Re: Open multiple excel spreadsheet from ppt VBA
- Next by thread: Re: Open multiple excel spreadsheet from ppt VBA
- Index(es):
Relevant Pages
|