• WSralphad

    WSralphad

    @wsralphad

    Viewing 8 replies - 271 through 278 (of 278 total)
    Author
    Replies
    • in reply to: Excel 97>2000 (Excel 2000) #1787657

      I don’t see any attachment

    • in reply to: Disable “X” Box On UserForms (2000) #539868

      you’re right, I didn’t read the help closely enough!

      that should go in the form’s closing code then

    • in reply to: Disable “X” Box On UserForms (2000) #539845

      very similar to the solution I provided yesterday, but read further down that thread as their is another issue with Alt+F4

    • in reply to: Disable “X” Box On UserForms (2000) #539844

      Agreed – the API calls should be used in combination with overriding the Alt+F4 behaviour to guarantee complete control.

      Since OnKey is an application method, it’s hardly suprising that it stops you from closing Excel using Alt+F4, as the call to this method obviously has Application level scope. What I DO find suprsising is that you can’t ‘cancel’ the OnKey call. It seems once you’ve set the OnKey for Alt+F4 to “”, you can’t change back to the default behaviour again.

    • in reply to: How do I close a Print Preview window from code? (97) #539842

      that would not only risk closing other print previews, but also other windows which also have no text. I can’t see the benefit if I already know that the WindowClass is Excel@

    • in reply to: How do I close a Print Preview window from code? (97) #539595

      Andrew, thanks for the thread. I also have VB so I ran the code from there. I also added a call to GetWindowText to find out the caption. It appears that the Excel@ window has NO caption.
      In fact, I’m beginning to think that this method is not going to work. I don’t think I can just kill the Window since the normal user action is a button press outside the window, and besides, using FindWindow, passing Excel@ as the classname seems risky as it might yield the hwnd of another print preview window somewhere else.

    • in reply to: How do I close a Print Preview window from code? (97) #539363

      Thanks Andrew, I’ll experiment with Excel@ and see if I can get it to work. Out of curiosity, how did you find that out?
      With regard to your quesion about letting the user close the preview, I hear what you are saying, but I’m actually trying to solve this for another programmer, who seems to spawn an Excel.Application from code, and then needs to kill Print Preview _if_ a user has switched to print preview mode in that instance of the application.

    • in reply to: Thumbnail view not working #510231

      that worked a treat!!! thanks v much! I wonder what MS are intending to do about it!!!

    Viewing 8 replies - 271 through 278 (of 278 total)