View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Moseley Alan Moseley is offline
external usenet poster
 
Posts: 75
Default refer to active window when more than one window open for a file

Depending upon what you are doing, you probably need to use the
ActiveWorkbook object , the ActiveSheet object, maybe even ActiveCell.

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"mcambrose" wrote:

How do I refer to a specific window when I have a file with multiple windows
open. I originally wrote a macro to operate on a workbook with only one
window open. I used the workbooks("mybook").activate, but now that I have
more than one window open, it always selects the first window. If i am in the
second window when I run the macro, it puts the information in the active
cell in the first window of the workbook. How to I specifically refer to
window where the cursor is. Do I use some type of activewindow command? do i
create an object and set it equal to the current window? Thanks.