I am trying to open several workbooks with variable names using a loop. All of the filenames are of the form "variable GSC 2011_04.xlsx"
My code is below, with the problem area highlighted.
Thanks!![]()
Dim p1, p2, p3, p4 p1 = "apples01" p2 = "bananas2" p3 = "cat01" p4 = "dog01" Dim MyPath MyPath = "C:\Users\me\Documents\folder" ChDir MyPath Dim x For x = 1 to 4 Workbooks.Open (px & " GSC 2011_04.xlsx") Next x
Bookmarks