praveenlal
New Member
- Joined
- Oct 27, 2021
- Messages
- 34
- Office Version
- 2016
- Platform
- Windows
Sub filenameascell()
Dim filename As String
Dim path As String
Dim rng As Range
Worksheets("Sheet1").Activate
Set rng = Range("A1:A1000")
Application.DisplayAlerts = False
path = "C:\Users\New Folder"
filename = rng("A1:A10000").Value & ".xlsx"
ActiveWorkbook.SaveAs path & filename, xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub
Dim filename As String
Dim path As String
Dim rng As Range
Worksheets("Sheet1").Activate
Set rng = Range("A1:A1000")
Application.DisplayAlerts = False
path = "C:\Users\New Folder"
filename = rng("A1:A10000").Value & ".xlsx"
ActiveWorkbook.SaveAs path & filename, xlOpenXMLWorkbook
Application.DisplayAlerts = True
ActiveWorkbook.Close
End Sub