Dim wb As Workbook
Set wb = Workbooks.Add
wb.SaveAs Application.DefaultFilePath & "\" & "Master database" & Format(Now,"yyyy-mm-dd hh.mm") & ".xls"
Sub Test()
Dim Master_WKB As Workbook
Dim Value_R As Range
Dim wb As Workbook
Set Value_R = Sheet1.Range("A1")
Set Master_WKB = ActiveWorkbook
Value_R.Value = 0
Do
Value_R.Value = Value_R.Value + 1
Sheets("Sheet1").Copy
Set wb = ActiveWorkbook
wb.SaveAs Application.DefaultFilePath & "\CSI REPORTS " & Format(Now, "YYY-MMM-DD") _
& "\" & "CSI REPORTS " & Range("C1").Value & Format(Now, "yyyy-mm-dd hh.mm") & ".xls"
ActiveWindow.Close
Master_WKB.Activate
Loop Until Value_R.Value = Value_R.Offset(0, 1).Value
End Sub
If Len(Dir("D:\Market Data", vbDirectory)) > 0 Then
'save file down to already existsing folder Market Data?
Else
'make folder:
MkDir "D:\Market Data"
'code to save files
End If
If Len(Dir("D:\Market Data", vbDirectory)) > 0 Then
mean? is this referring to the end of the path i.e. Market Data?, vbDirectory