C
christopher ward
Hi All
If you can help my kindest thanks and sorry if I do not explain my issue
very well - I am no longer a programmer being old and grey ( whats left )
I have a direcory on my machine c:\finance
i want to loop in the directory on every .xls file ( open each SS and copy
data )
I am stuck on the loop I need to create and do not understand the DIR
structure very well - I suspect the code I want is simple in nature and is
more me being a poor VBA user.
If you can help please feel free -
Sub ProcessAll()
' ok we need to grab some meta data for Path and Extension from the META
cells
sPath = Worksheets("Meta").Cells(4, 2).Value
sExtension = Worksheets("Meta").Cells(6, 2).Value
If sPath = "" Or sExtension = "" Then
MsgBox "META data incorrect I will stop NOW check path and extension"
Exit Sub
End If
sFile = sPath & sExtension
MsgBox sFile
' so now we have the directory to loop within for all xls files ?
So far I have craeted this poor code
If you can help my kindest thanks and sorry if I do not explain my issue
very well - I am no longer a programmer being old and grey ( whats left )
I have a direcory on my machine c:\finance
i want to loop in the directory on every .xls file ( open each SS and copy
data )
I am stuck on the loop I need to create and do not understand the DIR
structure very well - I suspect the code I want is simple in nature and is
more me being a poor VBA user.
If you can help please feel free -
Sub ProcessAll()
' ok we need to grab some meta data for Path and Extension from the META
cells
sPath = Worksheets("Meta").Cells(4, 2).Value
sExtension = Worksheets("Meta").Cells(6, 2).Value
If sPath = "" Or sExtension = "" Then
MsgBox "META data incorrect I will stop NOW check path and extension"
Exit Sub
End If
sFile = sPath & sExtension
MsgBox sFile
' so now we have the directory to loop within for all xls files ?
So far I have craeted this poor code