Clearing results from a spreadsheet in VB - Excel 2010

Experts,

I have a spreadsheet  in Excel that loads from a query and module that runs in VB.  How do I clear the results from a prior run?
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy PooleCommented:
SheetName.Cells.Clear
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
moriniaAdvanced Analytics AnalystAuthor Commented:
The first line has headings.  Is there a way to clear the rest of the lines and leave the first line.  Sorry, I forgot to mention that.
0
Martin LissOlder than dirtCommented:
SheetName.UsedRange.Cells.Offset(1, 0).ClearContents
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Randy PooleCommented:
There you go :)
0
Martin LissOlder than dirtCommented:
I think you should split the points between Randy and myself, with him getting the bulk of them because he answered your original question, and I've requested attention to help you do that.
0
Randy PooleCommented:
It is no problem, just glad to help :)
0
Martin LissOlder than dirtCommented:
@morinia: Note that there's a difference between Clear and ClearContents. ClearContents removes only the values from the cells, whereas Clear removes the values and the cell formatting.
0
moriniaAdvanced Analytics AnalystAuthor Commented:
You are correct. What steps do I need to split points.?  I don't see an  option to "Request Attention".
0
Martin LissOlder than dirtCommented:
The Request Attention link is normally in the lower right hand corner of the first post in a thread, but since I already did it for you it's no longer there. You can however click the link in the salmon-colored area at the top of the thread. A moderator will respond soon no matter if you do that or not.
0
Martin LissOlder than dirtCommented:
Here's a picture of the Request Attention link from another question.
RA
0
Martin LissOlder than dirtCommented:
A moderator has reopened this question so that you can reassign the points.
0
Martin LissOlder than dirtCommented:
I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0
moriniaAdvanced Analytics AnalystAuthor Commented:
Thanks
0
Randy PooleCommented:
Thank you :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.