VBA questions

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
 
T

Tom Ogilvy

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.
 
T

Tom Ogilvy

Typo
Sheets("SheetName").UserRange.Clear
should be

Sheets("SheetName").UsedRange.Clear
 
Top