View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default How does Personal Macro Workbook become personal.xls

In message of Mon, 12 Apr 2010
12:21:13 in microsoft.public.excel.programming, Walter Briscoe
writes
In message of Tue, 30 Mar 2010
07:02:43 in microsoft.public.excel.programming, Walter Briscoe
writes
In message
.com of Mon, 29 Mar 2010 07:31:26 in microsoft.public.excel.programming
, AB writes
I don't think there is specific event for this but you can try using
the WindowActivate event of the thisWorkbook object.


[snip]

Thank you, I have done so.


[snip]

10) I checked the code is now in place. I will report any results.


The code detects the result of a sheet losing its hidden property, but
is not sufficiently fine-grained to detect the operation which does it.

I will leave the code in place as a guard and wait to become more
competent in dealing with events. ;(
Thanks, AB ;)


I have done a little more on this.
I reduced the number of sheets to 1 to simplify the problem.
I am closer to finding the offending sequence of operations.
It seems to be necessary (but not sufficient) to say "OK" to "This
action will reset your project, proceed anyway?" and later save
personal.xls within the VBE. (Excel sometimes loses its way and I do
occasional manual saves of personal.xls to minimise that risk.)

In Excel of personal.xls, Window\Hide and Window\Unhide write to
Workbooks("personal.xls").Windows.Item(1).Visible.

I would like to know how automatically to set a watch on that location.

I have made the VBIDE visible. I can't find anything about the structure
of watches in "Excel 2002 VBA". Perhaps I can run the Add Watch dialog.

In any case, I reckon to set the watch in workbook event procedures in
personal.xls. I hope to get there, but am happy to accept any help. ;)
--
Walter Briscoe