+ Reply to Thread
Results 1 to 3 of 3

macro ignoring commands

  1. #1
    Forum Contributor
    Join Date
    10-24-2008
    Location
    England
    Posts
    146

    macro ignoring commands

    Hi i dont know if anyone can help me? (By the way i have two worksheets open before running this macro)
    This script works great, except at the bottom at
    Please Login or Register  to view this content.
    The window "b16" Invoice.xls closes one of the worksheets, but the 2 other commands are ignored. I would like them to run on the other open worksheet.

    I have tried the above in a seperate macro and it works but when run after this script it does not. I have also tried time delays but that does not help either.

    Any help would be really appreciated

    Please Login or Register  to view this content.
    Many Thanks

  2. #2
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    Re: macro ignoring commands

    Perhaps try and select the open workbook prior to selecting worksheet 1?

    Please Login or Register  to view this content.
    Another possibility could be to close the other workbook after the two commands needing to be executed have been executed.

    Please Login or Register  to view this content.
    Last edited by starryknight64; 06-16-2009 at 03:54 PM. Reason: Added other possibility
    starryknight64

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: macro ignoring commands

    If the window you're closing is the one the code is running in ...

    And why use Windows(...) rather than Workbooks(...)?
    Entia non sunt multiplicanda sine necessitate

+ 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