Flyingmeatball
Board Regular
- Joined
- Aug 15, 2007
- Messages
- 65
I'm being given a spreadsheet with thousands of rows of data and I need to run a VBA macro sorting, deleting, etc. The problem I'm having is sometimes I'm given the data in the form of a table, and sometmies not. If it is in the form of a table i need to unlist the table. To do that I'm using:
With sheets("sheet1").ListObjects("Table1")
Set rList = .Range
.Unlist
End With
the problem I'm having is devising a test to see if that table exists. There would only ever be one table. Can anyone think of a good boolean test that says something along the line of if sheets("sheet1").listobjects("table1").exists then unlist it?
Thanks!
With sheets("sheet1").ListObjects("Table1")
Set rList = .Range
.Unlist
End With
the problem I'm having is devising a test to see if that table exists. There would only ever be one table. Can anyone think of a good boolean test that says something along the line of if sheets("sheet1").listobjects("table1").exists then unlist it?
Thanks!