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

Weird w2k Excel behaviour, will not shell properly 1

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
GB
We have a few windows 2000 pc's which show this strange behaviour, the xp ones do what you would expect.
What I am doing is to create a spreadsheet from Access and then shelling to it. Xp shows you the spreadsheet but w2k shows the Excel menus, buttons etc but a completely blank area where the spreadsheet should be. If I select print preview, I can see the thing and print it out. Close preview and I get the blank area again. Double clicking on the file in Explorer displays it properly. Using Excel 2002.

Should it make any difference, the end of the code is

xlBook.SaveAs "c:\overdrive\Contract " & cContractNo & " Customer Statement.xls"
xlBook.Close ' False
xlApp.Quit
Set xlBook = Nothing
Set xlApp = Nothing

lret = ShellExecute(Forms!frmmainmenu.hwnd, "open", "c:\overdrive\Contract " & cContractNo & " Customer Statement.xls", vbNull, vbNull, SW_SHOWNORMAL)
 
You may be able to avoid the Shell; how does this run (untested)?

xlBook.SaveAs "c:\overdrive\Contract " & cContractNo & " Customer Statement.xls"
xlBook.Application.Visible = True
Set xlBook = Nothing
Set xlApp = Nothing
 
I'll try it tomorrow at work, but I think it will not show the xls at all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top