VBA questions

  • Thread starter Thread starter Eric Wescott
  • Start date Start date
E

Eric Wescott

Is there any webpages or public docs where I can get a class breakdown
of all
Excel functions/variables in VBA? Specifically the cell style
variables? I've been unsuccessful in just playing with different
values and getting the results I need. (Things like cell boarders,
removing column/row lines etc etc)

Also I'm looking for a way to get the exact number of items in a
column and a way to completely clear a sheet. I'm currently performing
a

for i = 1 to width
Excel.Activeworkbook.Sheets("SHEETNAME").Columns(i) = ""
next i

however it doesn't remove formatting information like boarders


Thanks
Eric
 
Sheets("SheetName").UserRange.Clear

clear removes everything.


Turn on the macro recorder and manipulate your cells. The recorder records
settings for all attributes associated with your actions, not just the ones
you change, so it should give you some insight into what you have available.

Look in the object browser in the VBE at the range object.
 
Typo
Sheets("SheetName").UserRange.Clear
should be

Sheets("SheetName").UsedRange.Clear
 

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

Back
Top