Results 1 to 3 of 3

VBA to Close Workbook if BOTH Workbook is inactive and VBA is Not Open

Threaded View

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Hartford
    MS-Off Ver
    Microsoft Office 2007
    Posts
    3

    VBA to Close Workbook if BOTH Workbook is inactive and VBA is Not Open

    I have been searching high and low, but apparently nobody else has this need. I built an excel file for the department at my company that is accessed frequently by a few users. The file is still currently in development, so I need to regularly access the file for updates/maintanance. I am the only one that ever does any work in VBA, but the other users are notorious for opening the file and leaving their desk for hours at a time. I know how to implement an auto close/save routine if X amount of time has passed, however, it will still close even if I am working in VBA, which I, obviously, don't want. Any suggestions?

    Another option I considered was implementing an
    If VBA = False then
        'Start Timer Code
    End if
    But I don't know the correct syntax (if it exists) to do that and I have had no luck finding any threads that detail how to tell if VBA is open or not.

    Thanks.

    EDIT: Figured out a work around. I added this if statement:
    If Application.UserName <> "my UserName" Then
        'Start Timer Code
    End If
    Last edited by teblowtime; 05-23-2013 at 12:31 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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