kiekar
03-03-2007, 10:32 AM
Hello,
I've created a userForm to connect to an access database to copy data to a Worksheet. This works fine when the data is copied to "Sheet1".
When the data is copied to "Sheet2" an error is generated. "Select Method of Range class failed.
objWorksheet.Rows(2).Select
objExcel.ActiveWindow.FreezePane = True
Even when the error is generated, the data is still copied to "Sheet2" but the header row scrolls.
I've attached a doc with the copy data routine only. The error is generated at line 71
Any help would be much appreciated.
Thanks
Karl
I've created a userForm to connect to an access database to copy data to a Worksheet. This works fine when the data is copied to "Sheet1".
When the data is copied to "Sheet2" an error is generated. "Select Method of Range class failed.
objWorksheet.Rows(2).Select
objExcel.ActiveWindow.FreezePane = True
Even when the error is generated, the data is still copied to "Sheet2" but the header row scrolls.
I've attached a doc with the copy data routine only. The error is generated at line 71
Any help would be much appreciated.
Thanks
Karl