Trying to create a macro in Excel VBA.
Get Run-time error '91': Object variable or With block variable not set
What is wrong here? Isn't that simply supposed to work?
Function comeinand() As Object
Dim screwaround As Object
Set screwaround = New Collection
'Also tried:
'Dim screwaround As New Collection
'Set screwaround = CreateObject("System.Collections.ArrayList")
comeinand = screwaround
End Function