ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List of File Saved (https://www.excelbanter.com/excel-programming/339321-list-file-saved.html)

maperalia

List of File Saved
 
I have a program that save an excel file with specific "file name" and path
(see below). However, I want to know if this file name can be archived in one
spreadsheet.
For example, as soon the file is saved, this file name will be typed in the
cell A2 of the excel file "C:\List.xls". Then if another file is saved it
will be typed in the cell A3 and so on. Therefore, all the files name saved
will be located under the "column A" only

I wonder if this is possible to do it. Could you please tell me how?

Thanks in advance
Maperalia


Option Explicit
Sub SaveExcelFile()
Dim boError As Boolean
Dim strError As String
Dim Tract As String
Dim WO As String
Dim Supplier As String
Dim Dates As String
Dim Time As String
Dim sFilename As String
Dim Progname As String



strError = ""
boError = False
With Worksheets("Gradation Form")
If .Range("G2") = "" Then
boError = True
strError = strError & "WORK ORDER # "
End If
If .Range("G3") = "" Then
boError = True
strError = strError & "TRACT #"
End If
If .Range("C6") = "" Then
boError = True
strError = strError & "SUPPLIER "
End If
If .Range("G4") = "" Then
boError = True
strError = strError & "DATE "
End If
If .Range("G5") = "" Then
boError = True
strError = strError & "TIME"
End If
If boError = True Then
MsgBox "The Following Ranges have not been Typed Yet - " & strError
Exit Sub
Else


WO = Worksheets("Gradation Form").Range("G2")
Tract = Worksheets("Gradation Form").Range("G3")
Supplier = Worksheets("Gradation Form").Range("C6")
Dates = Worksheets("Gradation Form").Range("G4")
Time = Worksheets("Gradation Form").Range("G5")


Progname = "C:\Mario\VB\Excel\" & WO & "_" & Tract & "_" & Supplier &
"_" & Dates & "_" & Time & ".xls"
ActiveWorkbook.SaveCopyAs Progname
End If
End With
End Sub


All times are GMT +1. The time now is 08:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com