Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Stop MSG's on exit! (Excel 2002)

    I have a user that has a W/B that contains a macro to exit Excel. Based on the macros actions, Excel prompts with these two msg's before it closes. The user wants the macro to close quietly!

    I'm assuming I can add the Application.DisplayAlerts = false property into the macro to prevent the confirmation of the sheet delete from prompting, but haw can I prevent the Clipboard prompt from appearing. Is there a way to clear the clipboard from its data?
    Regards,
    Rudi

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Stop MSG's on exit! (Excel 2002)

    Clear the clipbard:

    <pre>application.CutCopyMode=false</pre>


    Steve

  3. #3
    Star Lounger
    Join Date
    Feb 2003
    Location
    near Blairgowrie, Perthshire, Scotland
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Stop MSG's on exit! (Excel 2002)

    If you look in VBA Help for clipboard, PutInClipboard you should be able to use the technique there overwrite the Clipboard with a couple of bytes and that should suppress the message.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Stop MSG's on exit! (Excel 2002)

    Yes: Application.CutCopyMode=False
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Stop MSG's on exit! (Excel 2002)

    Thx guys, I'll let the user know!
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •