Hi there!!
I have a problem that i cant solve and i want your help.
I want to refer a workbook's name into a messagebox using a variable to assign each workbook
---------------------------------------------------
Sub x()
Dim i As Long
Dim wbName_1 As String
Dim wbName_2 As String
wbName_1 = "Test_1.xlsx"
wbName_2 = "Test_2.xlsx"
Dim PathName As String
For i = 1 To 2
PathName = MsgBox("c:\Test\" & wbName_ & (i))
Next i
End Sub
----------------------------------------------------
The result that i want to see on the screen is the "c:\Test\Test_1.xlsx" and for the next one "c:\Test\Test_2.xlsx".
Instead i get the "c:\Test\1" and the "c:\Test\2"
Thanks in advance!
I have a problem that i cant solve and i want your help.
I want to refer a workbook's name into a messagebox using a variable to assign each workbook
---------------------------------------------------
Sub x()
Dim i As Long
Dim wbName_1 As String
Dim wbName_2 As String
wbName_1 = "Test_1.xlsx"
wbName_2 = "Test_2.xlsx"
Dim PathName As String
For i = 1 To 2
PathName = MsgBox("c:\Test\" & wbName_ & (i))
Next i
End Sub
----------------------------------------------------
The result that i want to see on the screen is the "c:\Test\Test_1.xlsx" and for the next one "c:\Test\Test_2.xlsx".
Instead i get the "c:\Test\1" and the "c:\Test\2"
Thanks in advance!