I want to copy sheets from a particular workbook in VBA to my Active Workbook and do a lot of calculations using it. Now the problem is that the target sheet name always keeps on changing and I always get an error.
Set targetWorkbook = Application.ActiveWorkbook
filter = "Text files (*.xls*),*.xls*"
Caption = "Please Select the Target file"
Ret = Application.GetOpenFilename(filter, , Caption)
If Ret = False Then Exit Sub
Application.AskToUpdateLinks = False
Set wb = Workbooks.Open(Ret)
Application.AskToUpdateLinks = True
wb.Worksheets("**This Keeeps on Changing**").Move After:=targetWorkbook.Sheets(targetWorkbook.Sheets.Count)
Can I select or Input the name in a MsgBox or something similar so that I dont get an error. Please help.