Solved

Delete the first row of every worksheet

Posted on 2011-03-15
2
208 Views
Last Modified: 2012-05-11
I simply need to delete the first row of every worksheet in an Excel workbook.
0
Comment
Question by:thomasd04
2 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 35139407
Manually, you can select the first sheet, hold Shift and click the last sheet tab, then delete the first row.
In code:
Sub DelRow1()
   Dim wks as Worksheet
   For each wks in activeworkbook.worksheets
      wks.rows(1).delete
   next wks
End sub

Open in new window

0
 
LVL 3

Author Comment

by:thomasd04
ID: 35139514
Thanks! The VB code worked perfectly.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question