D
diverdon99
Hi All
The code used to import the excel sheets is below, my problem is that
the table DBReccData may have from 1 to 33 rows of data. How do I
determine the point where no data in the row exists and stop
importing?
Thanks in advance
Don
Extract ............................................
For z = 1 To sheetcnt
Set sheet = xlapp.ActiveWorkbook.Sheets(z)
If (sheet.Name = "DBSiteData") Then
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="Maj_Import", _
Filename:="C:\Documents and Settings\Don\Desktop\Nevil
Current\OA_DataEntryv2.xls", Hasfieldnames:=False, _
Range:="DBSiteData!a2:ap2",
SpreadsheetType:=acSpreadsheetTypeExcel9
End If
If (sheet.Name = "DBReccData") Then
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="Min_Import", _
Filename:="C:\Documents and Settings\Don\Desktop\Nevil
Current\OA_DataEntryv2.xls", Hasfieldnames:=False, _
Range:="DBReccData!a2:aa33",
SpreadsheetType:=acSpreadsheetTypeExcel9
End If
Next z
The code used to import the excel sheets is below, my problem is that
the table DBReccData may have from 1 to 33 rows of data. How do I
determine the point where no data in the row exists and stop
importing?
Thanks in advance
Don
Extract ............................................
For z = 1 To sheetcnt
Set sheet = xlapp.ActiveWorkbook.Sheets(z)
If (sheet.Name = "DBSiteData") Then
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="Maj_Import", _
Filename:="C:\Documents and Settings\Don\Desktop\Nevil
Current\OA_DataEntryv2.xls", Hasfieldnames:=False, _
Range:="DBSiteData!a2:ap2",
SpreadsheetType:=acSpreadsheetTypeExcel9
End If
If (sheet.Name = "DBReccData") Then
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="Min_Import", _
Filename:="C:\Documents and Settings\Don\Desktop\Nevil
Current\OA_DataEntryv2.xls", Hasfieldnames:=False, _
Range:="DBReccData!a2:aa33",
SpreadsheetType:=acSpreadsheetTypeExcel9
End If
Next z