Thread: Workbook name
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
external usenet poster
 
Posts: 125
Default Workbook name - got it at last

Got it at last:

Windows(ActiveWorkbook.Name + ":1").Activate
or
Windows(ActiveWorkbook.Name & ":1").Activate

Intreaging for an amateur that it seems to make no difference using
+ or & (plus or ampersand) !

Francis


"JE McGimpsey" wrote in message
...
One way:

Windows(Workbook.Name & ":1").Activate



In article ,
"Francis Hookham" wrote:

I need to activate one or other windows by switching from one to the
other
rather than by name of sheet:

Windows("DoorSchedule.xls:1").Activate
Windows("DoorSchedule.xls:2").Activate

but this does not work if the Workbook is renamed.

Please show me how to write something like:

Windows(Workbook.name + ".xls:1").Activate

Thanks

Francis Hookham