View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter Chatterton[_2_] Peter Chatterton[_2_] is offline
external usenet poster
 
Posts: 17
Default How to go to next workbook?

I want to copy to the next workbook,
but some code I found doesn't even start to work.

At http://www.cpearson.com/excel/sheetref.htm
it talks about worksheets but I get stuck at:
Application.Volatile True
v = Application.Caller.Parent.Index
which gives an 'object reqd' msg.

also
i = Application.Caller.Parent.Parent.Worksheets.Count
fails the same way.

I just did the latter with a copy/paste,
so it's not a typo problem.

I'm calling the macro from the spreadsheet with alt-F8.

Hope you can help,
Peter.