rkbisht2019
Member
Hi All,
I wanna open filename using macro, but unable to do it. Although purpose of opening file is to rename files from "N2" to "North-2" and "N3" to "North-3". Also, renaming zone column which first column name in both excel files following same condition i.e. "N2" to "North-2" and "N3" to "North-3"
But I am stuck in Step-1, unable to open file using macro.
Also, if you can provide me working code for this requirement then I will be highly obliged to you.
Merry Christmas
>>> use code - tags <<<
This thread should be open in VBA Macros (in this time moved).
I wanna open filename using macro, but unable to do it. Although purpose of opening file is to rename files from "N2" to "North-2" and "N3" to "North-3". Also, renaming zone column which first column name in both excel files following same condition i.e. "N2" to "North-2" and "N3" to "North-3"
But I am stuck in Step-1, unable to open file using macro.
Also, if you can provide me working code for this requirement then I will be highly obliged to you.
Merry Christmas
>>> use code - tags <<<
Code:
Sub FileOpen_Macro()
Dim FileName(0 To 1) As String
FileName(0) = "N2.xlsx"
FileName(1) = "N3.xlsx"
For i = 0 To 1
Workbook.Open FileName:="G:\Team Learning\vbapractice\Dunning\Export\" & FileName(i)
Next i
End Sub
This thread should be open in VBA Macros (in this time moved).
Attachments
Last edited by a moderator: