+ Reply to Thread
Results 1 to 4 of 4

VBA: Answer YES to Contents of Clipboard

  1. #1
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236

    Question VBA: Answer YES to Contents of Clipboard

    I'm copying large amount of data from one spreadsheet to another. Then I close the Workbook.

    wb1.Close SaveChanges = False

    I then get a dialog box asking me if I want to save the data on the clipboard or not. I want to choose automatically (via VBA) to not save the contents on the clipboard.

    Sorry I'm just a novice at VBA......but getting better.

    Tony

  2. #2
    Nigel
    Guest

    Re: Answer YES to Contents of Clipboard

    Place the following around your code .....

    Application.DisplayAlerts = False

    'your code

    Application.DisplayAlerts = True

    --
    Cheers
    Nigel



    "ajocius" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I'm copying large amount of data from one spreadsheet to another. Then
    > I close the Workbook.
    >
    > wb1.Close SaveChanges = False
    >
    > I then get a dialog box asking me if I want to save the data on the
    > clipboard or not. I want to choose automatically (via VBA) to not save
    > the contents on the clipboard.
    >
    > Sorry I'm just a novice at VBA......but getting better.
    >
    > Tony
    >
    >
    > --
    > ajocius
    > ------------------------------------------------------------------------
    > ajocius's Profile:

    http://www.excelforum.com/member.php...o&userid=17695
    > View this thread: http://www.excelforum.com/showthread...hreadid=389549
    >




  3. #3
    okaizawa
    Guest

    Re: VBA: Answer YES to Contents of Clipboard

    Hi,

    if you want to save (as the subject of your post)
    try

    Application.DisplayAlerts = False
    wb1.Close SaveChanges = False
    Application.DisplayAlerts = True

    if you don't want to save,

    Application.CutCopyMode = False
    wb1.Close SaveChanges = False

    --
    HTH,

    okaizawa

    ajocius wrote:
    > I'm copying large amount of data from one spreadsheet to another. Then
    > I close the Workbook.
    >
    > wb1.Close SaveChanges = False
    >
    > I then get a dialog box asking me if I want to save the data on the
    > clipboard or not. I want to choose automatically (via VBA) to not save
    > the contents on the clipboard.
    >
    > Sorry I'm just a novice at VBA......but getting better.
    >
    > Tony
    >
    >


  4. #4
    Forum Contributor
    Join Date
    12-22-2004
    Location
    Kokomo, Indiana
    Posts
    236

    Red face It Worked

    Thank you to the two fellows who answered my question. You guys are awesome. Thank you for the quick reply also.

    Tony

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1