Results 1 to 3 of 3

Thread: ActiveWorkbook Close AND "No" to Clipboard information.
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Dec 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    When I execute this macro in a file, there are 37 instances of this:

    Application.ScreenUpdating = False

    Workbooks.Open(FileName:= _
    "C:WINNTProfileswhipplerDesktopZETIAEarlyViewsOBR Nation.xls"). _
    RunAutoMacros Which:=xlAutoOpen
    Range("A1:Q14").Select
    Range("Q14").Activate
    Selection.copy
    ActiveWindow.ActivateNext
    Range("A1").Select
    ActiveSheet.Paste
    ActiveWindow.ActivateNext
    Range("A18:Q172").Select

    Application.CutCopyMode = False
    Selection.copy
    ActiveWindow.ActivateNext
    Range("A75").Select
    ActiveSheet.Paste

    ActiveWindow.ActivateNext
    ActiveWorkbook.Close SaveChanges:=False

    I get the "There is a lot of information....Clipboard....do you want to save it?....etc" when the macro executes the close active workbook with no changes.

    Does anyone know the code to make this go away automatically when the workbook closes?

  2. #2
    Board Regular
    Join Date
    Jul 2002
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    just move the code
    Application.CutCopyMode = False

    to just before you switch workbooks

  3. #3
    New Member
    Join Date
    Dec 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thank you!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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