howdy,
How do I change to another workbook which is open in excel, yet the name will be different when I receive the file? I want to use code to reference between the two... just not sure how or even if it can be done....
So basically wb will already be active, before I open up the second workbook (wb2). It then needs to refer to the second workbook via Windows(filename).Activate... which i then proceed to extract out some data...
Any ideas?
How do I change to another workbook which is open in excel, yet the name will be different when I receive the file? I want to use code to reference between the two... just not sure how or even if it can be done....
Code:
Dim filename As String
Dim wb As Workbook
Dim wb2 As Workbook
Set wb = ThisWorkbook
filename = ?????
Windows(filename).Activate
Set wb2 = ActiveWorkbook
So basically wb will already be active, before I open up the second workbook (wb2). It then needs to refer to the second workbook via Windows(filename).Activate... which i then proceed to extract out some data...
Any ideas?