G Gary Keramidas Nov 14, 2007 #1 how would i remove all elements from a variable set as new collection? erase expects an array.
G Guest Nov 14, 2007 #2 Set your collection to nothing and then re-create it... Dim col As Collection Set col = New Collection col.Add Sheet1, Sheet1.Name col.Add Sheet2, Sheet2.Name col.Add Sheet3, Sheet3.Name MsgBox col.Item(Sheet2.Name).Name Set col = Nothing Set col = New Collection
Set your collection to nothing and then re-create it... Dim col As Collection Set col = New Collection col.Add Sheet1, Sheet1.Name col.Add Sheet2, Sheet2.Name col.Add Sheet3, Sheet3.Name MsgBox col.Item(Sheet2.Name).Name Set col = Nothing Set col = New Collection
G Gary Keramidas Nov 14, 2007 #3 thanks jim, works for me. -- Gary Jim Thomlinson said: Set your collection to nothing and then re-create it... Dim col As Collection Set col = New Collection col.Add Sheet1, Sheet1.Name col.Add Sheet2, Sheet2.Name col.Add Sheet3, Sheet3.Name MsgBox col.Item(Sheet2.Name).Name Set col = Nothing Set col = New Collection Click to expand...
thanks jim, works for me. -- Gary Jim Thomlinson said: Set your collection to nothing and then re-create it... Dim col As Collection Set col = New Collection col.Add Sheet1, Sheet1.Name col.Add Sheet2, Sheet2.Name col.Add Sheet3, Sheet3.Name MsgBox col.Item(Sheet2.Name).Name Set col = Nothing Set col = New Collection Click to expand...
C Chip Pearson Nov 14, 2007 #4 Set the collection variable to Nothing. E.g., Set MyCollection = Nothing -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site)
Set the collection variable to Nothing. E.g., Set MyCollection = Nothing -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site)