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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xlDialogPrintPreview and XP

Status
Not open for further replies.

Kaulana

Technical User
Jul 31, 2001
24
0
0
US
I work remotely with Windows ME and Office 97. The people I work for upgraded to Windows XP, keeping Office 97. The problem is the print preview code I wrote for pre-xp fails to return to the same place it was. Here's the code:

Me.Hide
Application.Dialogs(xlDialogPrintPreview).Show
Application.DisplayAlerts = False
Shets("WPS").Delete
Application.DisplayAlerts = True
Me.Show

Before XP, Excel would return to the form with the spreadsheet being viewed still open behind the form. Now, it closes the spreadsheet after the Preview is closed, plus it appears to reload the form, adding duplicate entries to all the dropdown boxes.

I could delete the three lines that turn off and on alerts and delete the preview page, but would that do any good? Does anyone know? I can add clears to the combo boxes, too, so the mysterious reload doesn't overpopulate them, but that doesn't solve the problem of the sheet closing. Kaulana (aka Bob)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top