Re: Open Excel then a spreadsheet?
From: James T. (anonymous_at_discussions.microsoft.com)
Date: 04/21/04
- Next message: Ron: "Re: Combo box in subform"
- Previous message: Rick Brandt: "Re: Command Button"
- In reply to: Ken Snell: "Re: Open Excel then a spreadsheet?"
- Next in thread: Gina: "Re: Open Excel then a spreadsheet?"
- Reply: Gina: "Re: Open Excel then a spreadsheet?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 06:04:51 -0700
The "s" worked! Details, details, details! Thanks to Gina
too for responding and the detailed response from Ken. I
really appreciate this group!
James
>-----Original Message-----
>Private Sub Command10_Click()
>
> ' start Microsoft Excel.
> Set excelApp = CreateObject("Excel.Application")
>
> With excelApp
>
> ' Make the application visible.
> .Visible = True
> ' Open the document.
> .Workbooks.Open "C:\DataLetters\SpreadsheetTest.xls"
>' etc. etc. etc.
>
>If you use the CreateObject, you do not need to include
reference to EXCEL
>in References. ACCESS will do this when it creates
excelApp object (called
>"late binding"). This actually is preferred over "early
binding" (declare
>reference to EXCEL in the application's References)
because late binding
>doesn't require you to know which version of EXCEL is
running on the
>machine.
>
>--
> Ken Snell
><MS ACCESS MVP>
>
>
>"James T." <anonymous@discussions.microsoft.com> wrote in
message
>news:1d0201c42723$9f3732f0$a101280a@phx.gbl...
>> I had tried spreadsheet and it didn't work, so I just
>> tried your suggestion, Workbook, and it didn't work
>> either. Thanks for the suggestion, though!
>>
>> James
>>
>> >-----Original Message-----
>> >I THINK you hav eo use .Workbook.Open instead of
>> >Document.Open for Excel
>> >
>> >>-----Original Message-----
>> >>Using Access 2000
>> >>
>> >>I use the following code with Word a lot:
>> >>
>> >>Private Sub Command10_Click()
>> >>
>> >> ' start Microsoft Word.
>> >> Set wordApp = CreateObject("Word.Application")
>> >>
>> >> With wordApp
>> >>
>> >> ' Make the application visible.
>> >> .Visible = True
>> >> ' Open the document.
>> >> .Documents.Open
>> >>("C:\DataLetters\NoticeToProceed.doc")
>> >>
>> >>I have tried the same thing recently with Excel with:
>> >>
>> >>Private Sub Command10_Click()
>> >>
>> >> ' start Microsoft Excel.
>> >> Set excelApp = CreateObject("Excel.Application")
>> >>
>> >> With excelApp
>> >>
>> >> ' Make the application visible.
>> >> .Visible = True
>> >> ' Open the document.
>> >> .Documents.Open
>> >>("C:\DataLetters\SpreadsheetTest.xls")
>> >>
>> >>Excel opens, but not the spreadsheet.
>> >>
>> >>Any help greatly appreciated.
>> >>
>> >>Thanks,
>> >>
>> >>James
>> >>
>> >>
>> >>.
>> >>
>> >.
>> >
>
>
>.
>
- Next message: Ron: "Re: Combo box in subform"
- Previous message: Rick Brandt: "Re: Command Button"
- In reply to: Ken Snell: "Re: Open Excel then a spreadsheet?"
- Next in thread: Gina: "Re: Open Excel then a spreadsheet?"
- Reply: Gina: "Re: Open Excel then a spreadsheet?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|