Yulyo
10-26-2017, 12:24 AM
Hello all,
I have a macro that saves me my excel workbook, in a specific location, with a name from a specific cell.
The problems i have right now are these:
- i don't want the macro to save me the entire workbook, only sheet1
- i don't want the macro to save the entire sheet 1, only A1:V100
- in cell X5 i have a date (25.10.2017) <---- this date will be the name of the saved file, but i need the macro to save the file with a name like this "171025"
This is the code i have right now:
Sub Save()
Dim Path As String
Dim filename As String
Path = "C:\Users\Computer\Desktop\1801-1901\"
filename = Range("X5")
ActiveWorkbook.SaveAs filename:=Path & filename & ".xls", FileFormat:=xlNormal
End Sub
Thank you!
I have a macro that saves me my excel workbook, in a specific location, with a name from a specific cell.
The problems i have right now are these:
- i don't want the macro to save me the entire workbook, only sheet1
- i don't want the macro to save the entire sheet 1, only A1:V100
- in cell X5 i have a date (25.10.2017) <---- this date will be the name of the saved file, but i need the macro to save the file with a name like this "171025"
This is the code i have right now:
Sub Save()
Dim Path As String
Dim filename As String
Path = "C:\Users\Computer\Desktop\1801-1901\"
filename = Range("X5")
ActiveWorkbook.SaveAs filename:=Path & filename & ".xls", FileFormat:=xlNormal
End Sub
Thank you!