View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mike mike is offline
external usenet poster
 
Posts: 216
Default Sheets select method fails when workbook is opened by another workbook

All,

Sub Workbook_Open contains the lines:

Sheets("QueryInfo").Select
Range("LastQueryUpdate").Select

These lines function properly when I open the workbook
directly. But if I open the workbook from another
workbook, the sheets select line has no effect (stepping
thru in break mode), and the range select line
subsequently fails. I tried
putting "ThisWorkbook.Activate" in the code but to no
avail. Can anyone tell me why the code doesn't work when
the workbook is opened by another workbook? What's the
fix?

TIA, Mike