vba - Out of range error for Windows().Activate -


i have bit of code in macro follows

chdir file_pth workbooks.open filename:= file_pth & "\" & open_tkt workbooks.open filename:= file_pth & "\" & closed_tkt activesheet.select windows("mss - ticket backlog benchmark_2013 09 05.xlsx").activate sheets("extract -prev").select 

what trying here when click button in excel sheet has macro runs , open 2 other files , shouls go file in run macro. , have operation in same xl workbook.

but getting out of range error in line

windows("mss - ticket backlog benchmark_2013 09 05.xlsx").activate though file mss - ticket backlog benchmark_2013 09 05.xlsx existis

could 1 me problem here.

try

windows("mss - ticket backlog benchmark_2013 09 05").activate

you check names of open workbooks in debug window this:

dim obook workbook  each obook in workbooks     debug.print ">" & obook.name & "<" next 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -