Right, I am not particularly good with this stuff.
I am trying to get all the files in a folder into a list in excel, as I am lazy.
I have an array which reads all the files in, and I can output all the files out, the one thing I can't seem to do, is output to a list. Ie, I can't move my activecell to the next in a range, I just overwrite the top cell in the list.
What I thought I could do is:
Code:
Function outputToSheet(listArray As Variant, arraySize As Integer) As Variant
Dim fileName1 As String
Dim counter As Integer
Dim outputRange As Range
counter = 1
While (counter < arraySize)
fileName1 = listArray(counter)
Set outputRange = Range(Cells(counter, 1), Cells(arraySize, 1))
ActiveCell.Value = fileName1
ActiveCell = outputRange.Next
counter = counter + 1
Wend
but this doesn't work, I realise I must be missing something fundamental about ranges and cells and selections or something, but any help would be appreciated, Thanks.