Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
The OnActivateSheet does not get fired for the sheet initially displayed. In 8.20 I passed an initial macro to run and even if that was just an empty shell, this would result in the OnActivateSheet trigger firing on the initial sheet; sadly, this doesnt work with with v9sr4.
The OnActivateSheet should run a macro that (after a WaitForIdle) looks at the screen resolution and applies a ZoomToFitWindow if needed to cater for those users not using 'the norm'.
I even added the following in the initial macro to try to force the OnActivateSheet but with no success:
ActiveDocument.Sheets("Depot Managers").Activate
How might I achieve this with v9?
Regards,
Gordon
Hi
In Qv 9 there are built in triggers avialable use them for activating or deactivating sheets and also u can set condition i.e on Open o e on any select i.e this u can do in Document Properties there is a tab Macros where u have to set those conditions
Check there
Cheers,
Ajay
Hi Ajay,
Thank you for the reply.
The problem is that the trigger is not fired for the initial sheet. You can add an OnActivate trigger to this sheet and it will not fire when the document is opened- if you click to another sheet and then back to it, it will.
Even if you have an OnOpen trigger for the document that runs a macro with an ActtiveDocument.Sheets("sheetname").Activate the OnActivate trigger for the named sheet is not fired. Its possibly a timing thing but I even tried ActiveDocument.GetApplication.WaitForIdle before it with no success.
Regards,
Gordon