References and various versions of Office

G

Guest

I'm having continual problems with my Access projects, and I'm wondering if
anyone can suggest solutions.

I develop on my 2003 install, my scripts call most of the basic DAO/ADO
libraries, and in one case uses Excel as well (for export). When I then
deploy the application to our network, invariably it will cough up errors
about missing references on almost all other machines. I then have to go and
fix the references by hand.

This is VERY ANNOYING. Is there any solution to this?

Another problem along the same lines is that I cannot call applications on
other machines. In one particular case I call Excel on another machine on the
network in order to have it process some data (there's a hardware key on it).
However since my machine has 11 and that machine has 9, practically any call
will result in an error about "procedure number out of range" -- which I
assume is due to the versions.

Is there anything I can do about that? Generally, is there some way to call
other Office applications in a way that will not break when run on some other
machine? It's not like I'm using fancy features here, we're talking about
"open" and other commands that are in there from the start.

Maury
 
A

Andi Mayer

I'm having continual problems with my Access projects, and I'm wondering if
anyone can suggest solutions.

I develop on my 2003 install, my scripts call most of the basic DAO/ADO
libraries, and in one case uses Excel as well (for export). When I then
deploy the application to our network, invariably it will cough up errors
about missing references on almost all other machines. I then have to go and
fix the references by hand.

This is VERY ANNOYING. Is there any solution to this?

Another problem along the same lines is that I cannot call applications on
other machines. In one particular case I call Excel on another machine on the
network in order to have it process some data (there's a hardware key on it).
However since my machine has 11 and that machine has 9, practically any call
will result in an error about "procedure number out of range" -- which I
assume is due to the versions.

Is there anything I can do about that? Generally, is there some way to call
other Office applications in a way that will not break when run on some other
machine? It's not like I'm using fancy features here, we're talking about
"open" and other commands that are in there from the start.

Maury

look at the MVP site for late versus early binding
 
G

Guest

Andi Mayer said:
look at the MVP site for late versus early binding

That did it, but with one caveat: you have to fully qualify all calls into
the xl object model. That is, you can't use WITH it seems, or at least not
the way I did it.

Maury
 
P

Paul Overway

You can use With...you just can't use the various Enum values, but instead
have to provide the explicit value.
 
A

Andi Mayer

That did it, but with one caveat: you have to fully qualify all calls into
the xl object model. That is, you can't use WITH it seems, or at least not
the way I did it.
no I can use it

here a part of a program:

Dim objExcel As Object
Dim objWkBook As Object
................
Set objExcel = CreateObject("excel.application")
Set objWkBook = objExcel.Application.Workbooks.add
With objWkBook.worksheets(1)
For I = 1 To UBound(aryE) 'die Überschriften
.cells(1, I).Value = aryE(I, 0)
.cells(1, I).Interior.Color = farbeHellGrau
.Columns(I).Font.Size = 10
Next I
For K = 1 To UBound(aryE, 2)
For I = 1 To UBound(aryE)
.cells(K + 1, I).Value = "'" & aryE(I, K)
Next I
Next K
For I = 1 To UBound(aryE) 'Grösse anpassen
.Columns(I).AutoFit
Next I
End With

ExportName = theDictionaryFile & wasTmp & CStr(aryE(0, 1))
If My.ExcelAbSpeichern(ExportName, objWkBook) Then
objExcel.Visible = True
Else
objExcel.Quit
End If
......................
 
G

Guest

Paul Overway said:
You can use With...you just can't use the various Enum values, but instead
have to provide the explicit value.

I must be doing something else wrong then, I'll keep playing.

Maury
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top