Dear All,
Creating an invoice in excel from Access.adp with SQL-server-data.
I have about 10 simular functions to create invoices for other clients,
never had this problem!
There are 2 types of orders in 1 invoice.
First i count the orders for each type.
Then i open excel-template-invoice and write date for each type if present.
Set xlApp = CreateObject("Excel.Application")
Set WB = xlApp.Workbooks.Open(strPath & "\" & strFile)
Set WS = WB.Sheets(1)
xlApp.Visible = True
The 2 parts of code for each ordertype are nearly the same.
If there only are orders of type 1 there are no problems, the invoice is
correctly created and saved.
BUT, the code for type2 triggers error -2147221080 Methode 'Cells' of
'_Worksheet' failed.
This is the codeline that trigger the error
MsgBox iRow ' shows a correctly the rowNr before the error
WS.Cells(iRow, 1).Value = "Tokyo"
After a hole day of looking, testing, stress i'm totally stuck!
Please HELP!
Filip
Bookmarks