Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Microsoft Excel 11.0 reference missing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CarlSprake - 02 Jul 2007 12:42 GMT
I have Office 2003 and Office 2007 installed on my machine.

I am trying to develop a solution for a customer that just uses Office 2003.

From Word I need to get information from Excel. So in my macro I have

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
etc, etc

I have tried to add a reference to Microsoft Excel, but could only find a
reference to Microsoft Excel 12.0, which I presume is Office 2007.

Is there anyway I can add a reference to Excel 2003 into my code, so that it
works on my customer's machine (who only had 2003)?

Thanks for your help
Graham Mayor - 02 Jul 2007 13:19 GMT
It should work if you set it locally up with the Excel 12.0 library and at
your customer's location with the Excel 11.0 library. The command set will
be largely similar.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I have Office 2003 and Office 2007 installed on my machine.
>
[quoted text clipped - 15 lines]
>
> Thanks for your help
Helmut Weber - 02 Jul 2007 15:51 GMT
Hi Carl,

just another one:

often early binding for development is recommended,
and later on late binding for execution,
which should work with some versions of Excel, in theory.

Sub Test459b()
' early binding with reference to Excel library
'Dim oExls As Excel.Application
'Dim oWrks As Excel.Worksheet
' late binding without reference to Excel library
Dim oExls As Object
Dim oWrks As Object

On Error Resume Next
Set oExls = GetObject(, "Excel.Application")
Err.Clear
If oExls Is Nothing Then
Set oExls = CreateObject("Excel.application")
End If
oExls.Visible = True
Set oWrks = oExls.Workbooks.Add ' or open a workbook

End Sub

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.