Select method fails

C

CDM

I'm trying to modify a spreadsheet from within Access with the following code:

Dim objWorkBook as object
Dim objWkSheet as object

Set objWorkBook = GetObject("C:\MyWorkBook.csv")
Set objWkSheet = objWorkBook.Sheets(1)
With objWkSheet
.rows("1:1").Select
.Delete Shift=:"xlUp"
End With

I'm getting an error that says "Select method failed". Does anyone know
what I'm doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top