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
Post a Comment