+ Reply to Thread
Results 1 to 4 of 4

Macro to shutdown workbook if name isnt on the list

  1. #1
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Macro to shutdown workbook if name isnt on the list

    Hi Guys

    I'm having a problem, I can't get the following to work? It highlights the "User" part in blue

    Basically, a list of names is in Z
    And the username should appear in A1. If the name does not match on the list, it should shutdown.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Macro to shutdown workbook if name isnt on the list

    Try this..

    Please Login or Register  to view this content.
    Don't forget to click *
    Last edited by JBeaucaire; 08-29-2014 at 01:09 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Macro to shutdown workbook if name isnt on the list

    Or this maybe..

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Macro to shutdown workbook if name isnt on the list

    Quote Originally Posted by Dibbley247 View Post
    Hi Guys

    I'm having a problem, I can't get the following to work? It highlights the "User" part in blue

    Basically, a list of names is in Z
    And the username should appear in A1. If the name does not match on the list, it should shutdown.

    Thanks

    Please Login or Register  to view this content.
    About the only thing I found wrong with your original code is, this;
    Please Login or Register  to view this content.
    should have been this;
    Please Login or Register  to view this content.
    And add 'End Sub' as the last line.
    Last edited by Jim885; 08-23-2014 at 08:25 AM.
    If I helped in any way, please click the star

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro filter isnt working
    By DBenson1968 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2013, 01:12 PM
  2. [SOLVED] a macro that will close the workbook when a certain file in the network isnt present?
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2013, 12:14 AM
  3. Updating links to a workbook that isnt open?
    By theduv1 in forum Excel General
    Replies: 0
    Last Post: 12-20-2010, 02:16 PM
  4. Shutdown macro
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-16-2010, 01:37 PM
  5. Shutdown Macro
    By suss-hmfc in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2008, 10:05 AM

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