You are welcome and thanks for the feedback,
Alan
( P.s. Possibly you are aware of this, but just in case you don't know this, I thought I would mention it in passing...
You have a couple of lines like this
Dim FileToOpen, A(11) As Variant
Dim c, R As Long
What you have there is actually this, ( since variant is the default when you do not explicitly do it )
Dim FileToOpen As Variant, A(11) As Variant
Dim c As Variant, R As Long
It does make sense to have FileToOpen as Variant, because you may get a String type returned to it or a Boolean False. So a Variant is required to hold either of those two types.
But I am not sure what c is supposed to be in your coding. I may have missed something. If you wanted c to be dimensioned a Long type, then you would need to do this:
Dim c As Long, R As Long
If you do , as you did, this .._
Dim c, R As Long
_.. then c will then be dimensioned as a Variant)




Reply With Quote

Bookmarks