OzzieTheOwl
Technical User
Hi
I have the following code which is supposed to open up every Excel file in a directory, but it only appears to open up every other file.
Can anyone see what I have done wrong?
Cheers
Barney
I have the following code which is supposed to open up every Excel file in a directory, but it only appears to open up every other file.
Can anyone see what I have done wrong?
Code:
Dim myFiles
myFiles = Dir("\\bbuukvirfnp0001\scm\logistics\Costing data\Stock Values " & YearNo & "\Week " & WeekNo & "\*.xls")
Do While Dir <> ""
Workbooks.Open Filename:="\\bbuukvirfnp0001\scm\logistics\Costing data\Stock Values " & YearNo & "\Week " & WeekNo & "\" & myFiles
myFiles = Dir
Loop
Cheers
Barney