Hello.
I have a module that is relatively straight forward:
Function PSCUInvoiceImport()
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "tbl_PSCU Invoice", "R:\DEPT-BR\Public\PSCU Invoice\PSCU Invoice.xls", True, "GL TOTALS!B7
50000"
End Function
The fields in the tbl_PSCU Invoice are as follows:
Element Column B
Element Name Column C
Service/Service Group Column D
Memo Column E
Item Type Column F
Item ID Column G
Type Column H
Qty Column I
Unit Price Column J
Base Amount Column K
Discount Column L
F12 Column M
Sales Tax Column N
F14 Column O
Net Amount Column P
I have the F12 and F14 in there because the header for Discount and Sales tax are merged cells (just the header).
If the spreadsheet is closed and I run the VBA, everything imports except Sales Tax and Net Amount. However, If I open the spreadsheet and run the VBA, those two fields populate.
I need to run this when the spreadsheet is not open. How can I do that and bring in all of the data?
This spreadsheet is from a third party and I don't have any control over what cells they merge and don't merge.
Thanks.
I have a module that is relatively straight forward:
Function PSCUInvoiceImport()
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "tbl_PSCU Invoice", "R:\DEPT-BR\Public\PSCU Invoice\PSCU Invoice.xls", True, "GL TOTALS!B7

End Function
The fields in the tbl_PSCU Invoice are as follows:
Element Column B
Element Name Column C
Service/Service Group Column D
Memo Column E
Item Type Column F
Item ID Column G
Type Column H
Qty Column I
Unit Price Column J
Base Amount Column K
Discount Column L
F12 Column M
Sales Tax Column N
F14 Column O
Net Amount Column P
I have the F12 and F14 in there because the header for Discount and Sales tax are merged cells (just the header).
If the spreadsheet is closed and I run the VBA, everything imports except Sales Tax and Net Amount. However, If I open the spreadsheet and run the VBA, those two fields populate.
I need to run this when the spreadsheet is not open. How can I do that and bring in all of the data?
This spreadsheet is from a third party and I don't have any control over what cells they merge and don't merge.
Thanks.