azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Can I change the following code so that I use the Cells notation instead of
H7:O12
as the range can alter but I would be able to work out the number of rows and columns and hence can use Cells instead.
H7:O12
as the range can alter but I would be able to work out the number of rows and columns and hence can use Cells instead.
Code:
objrst.Open "INSERT INTO tblKPIs SELECT * FROM [" & strSheetName & "$H7:O12] IN '" & ThisWorkbook.FullName & "' 'Excel 8.0;'", _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:\Sandwell PCT Front End.mdb"