Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing excel worksheets using Access VBA

Status
Not open for further replies.
Mar 12, 2001
30
GB
Hi all,

I currently have an access97 dbase which regularly imports a spreadsheet.
However, this spreadsheet has 3 undesired rows at the top of the single worksheet.
Currently I have to delete them manually by going into excel directly and then use the import function I have developed in access VBA.

Does anyone know of a way to perform this deletion process using access VBA. I understand there are various getobject commands etc which I am not familiar with.

I would appreciate any help/advice anyone can offer!

Cheerz

Dee
 
The simplest way to handle this is to set up a delete query. Import your data with the rows that you don't want.
Using your query builder create a delete query. If you want you can attach the delete query to a macro or do it in code. When you import your data it will run that query afterwards and delete your blanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top