I don't understand what I'm doing wrong. I want to assign the variable wkbWIW so I can use it in place of Workbooks("7000GT.xlsm) Here's what I have:
Dim wkbWIW As Workbook
Dim sWIWName as String
sWIWName = "7000GT"
If WorkBookExists(sWIWName & ".xlsm") Then
Set wkbWIW = Workbooks(sWIWName & ".xlsm")
End If
The code finds the workbook 7000GT.xlms but when I try to set the variable wkbWIW, it doesn't do anything (and causes an error in the rest of the code). The code runs over and over with a lot of different sWIWName values so I have to keep it a variable. Keep in mind the code is an excerpt and I'm just worried about the task of assigning the Workbook object.
Thanks ahead of time!!
Bookmarks