View Single Post
  #10   Report Post  
Bill Manville
 
Posts: n/a
Default

Looks like I was having a bad day on 24th March...

I'm getting error "Duplicate Declaration in Current Scope". Using Dim vFile,
vFiles (instead of Dim vFile, vFile) seems to get past that error.

Correct. My typo.

Line 3 (vFiles = Array....) returns an error but perhaps that is because the
line is wrapping to a second line. When I delete the return and list the
entire array text on the same line the error is not present.

Correct - forum software seems to have broken the long line for me.

Line 6 returns an error and I'm not sure why. It says syntax error. The line
is:
With ThisWorkbook.Sheets(Left(vFile, Len(vFile)-4)

Should be
With ThisWorkbook.Sheets(Left(vFile, Len(vFile)-4))

My data is coming from unnamed tabs

No such thing.
All worksheets have names - maybe the tabs are not being displayed.
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup