I'm using Excel 2010, trying to build collection from range and then copy it into another worksheet using this code:
Set g_colTGDNames = New Collection
Worksheets("CONF").Activate
Range("TGDNames").Select
Do Until ActiveCell.Value = ""
g_colTGDNames.Add ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Loop
Worksheets("TGDOut").Activate
Range("SymbolsOUT").Select
For Each obj In g_colTGDNames
ActiveCell.Value = CStr(obj)
ActiveCell.Offset(1, 0).Select
Next
Collection builds successfuly, but after I switch worksheets I got error 1004 on line
Range("SymbolsOUT").Select
I have no idea why, it works when i'm building collection. Any ideas?