VBA Excel Automation

G

Guest

Hello,
I have created a macro in Excel, I'm trying to put the same functionality in
Access VBA. It compiles fine, but I'm getting errors. Error 1004. Method
'Cells' of object 'Global' failed.

Can someone help me modify this syntax?

'Goal is to clear contents from row 2 down.
Set objClosed = objXLBook. _
Worksheets("Closed")
LastRow2 = Cells(Cells.Rows.Count, "A").End(xlUp).Row

Rows("2:" & LastRow2).Select
Cells.Select
Selection.Delete Shift:=xlUp
Selection.ClearContents

I also want to goto the Closed1 tab, select all active rows from Column A to
Column Q , and paste to tab closed, starting at Row2, column A.

Any assistance or direction you can give me is appreciated.

Thank you,
David
 

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