I have some working macros in Excel - and they work when tested in Excel !
I want to call them from Access ... and all the setting up of the "connection" to the open Excel workbook IS working too !
How come I can't run the macros from Access - here is a snipet of my code:
HTML Code:
Set myRec = F.Recordset
myRec.MoveFirst
Teller = 1
While Not myRec.EOF
With myRec
objexcel.Run "visEnPerson", .Fields("PersonID"), _
.Fields("Køn"), _
HentFMENavn(.Fields("PersonID")), _
.Fields("Fødselsdato"), _
.Fields("Fødested"), _
.Fields("Dødsdato"), _
.Fields("Dødssted")
End With
objexcel.Run "flytPerson", myRec.Fields("PersonID"), 1, "D"
Teller = Teller + 1
myRec.MoveNext
Wend
What am I missing here ?