+ Reply to Thread
Results 1 to 3 of 3

.Save, .Activate, .Close not working in Macro

  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    13

    .Save, .Activate, .Close not working in Macro

    This is a weird problem, I'm hoping you guys can help. I've written a pretty basic macro to pull information from one workbook to the other. This part works perfectly fine, but any .Activate, or .Close function does not work. Application.Quit does not work as well (although that is not what I want it to do). I at first thought it was a problem with our remote management software, but a simple macro of "ActiveWorkbook.Close False" does in fact work all alone.

    Here is the code:

    Please Login or Register  to view this content.
    Any suggestion on code optimization is appreciated, but I really need the opened workbook to close.
    Last edited by jstephens; 08-26-2011 at 09:49 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: .Save, .Activate, .Close not working in Macro

    Hello jstephens,

    Welcome to the Forum!

    With the exception of Application.Quit I don't see .Save, .Activate, or .Close in the code you provided. On potential problem I do see is that you exit the Sub with restoring screen updating.
    Please Login or Register  to view this content.

    Write a Sub to re-enable screen updating, and change your macro to re-enable screen updating before exiting. Rerun the macro and see if the changes help your problem.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-25-2011
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: .Save, .Activate, .Close not working in Macro

    Quote Originally Posted by Leith Ross View Post
    Hello jstephens,

    Welcome to the Forum!

    With the exception of Application.Quit I don't see .Save, .Activate, or .Close in the code you provided. On potential problem I do see is that you exit the Sub with restoring screen updating.
    Please Login or Register  to view this content.

    Write a Sub to re-enable screen updating, and change your macro to re-enable screen updating before exiting. Rerun the macro and see if the changes help your problem.
    That's embarassing, I had just changed something because of that and didn't put two and two together. Thanks a lot!

+ 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