I Have WName = ThisWorkbook.Name
and then I want to set Windows("WName").Activate
at another point in my code but is not working.
I am aware this might not make sense but it does with all of the sutf that is going on
below is a small test sub (I am not using this just trying to get it to work)
Thanks
Sub test()
'Copy Active Workbook Name
WName = ThisWorkbook.Name
'Activate a different Workbook
Windows("MyWorkbookAAA").Activate
'Activate Original workbook using WName
Windows("WName").Activate 'Have also tried Windows(WName).Activate
range("D2:D25").Select
Selection.Copy
Windows("MyWorkbookBBB").Activate
range("C22").Select
ActiveSheet.Paste
End Sub