Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Hide, .Show aspects of Windows XP

Status
Not open for further replies.

Kaulana

Technical User
Jul 31, 2001
24
US
In Windows 98 and using Excel 97, I had a bit of code to preview a sheet that the program had built. I found that if I hid the form first, using Me.Hide, then the preview acted as if it had been called from the File menu. If I left the form up, then the user had to key the Esc key to come back to the form. I used xlDialogs.PrintPreview to bring up the preview, because it showed only the page being shown, while ActiveWindow.PrintPreview showed all the sheets in the file. But that's not the problem.

After closing the preview, the code brought the form back with Me.Show. In Windows 98, everything was peachy. But in Windows XP, bringing the form back appears to fire the UserForm.Activate sequence, and that causes problems with double-loading dropdown boxes, opening up files that needn't be opened, and causing a whole list of other messes.

My question is: does anyone have any experience with Excel 97 VBA and Windows XP as it relates to this experience? I found a workaround by not using the PrintPreview at all, just viewing the sheets themselves, but that won't take care of all the cases. Would really appreciate some insight into the Hide and Show aspects of Windows XP.

Oh yes, the Esc method mentioned above caused an error, as well, so going back to that is not an option either, apparently.

I'm not at the site where the program is being used, so I cannot easily run tests with it to find out for myself. Kaulana (aka New Daddy Bob)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top