+ Reply to Thread
Results 1 to 6 of 6

Kicking someone out of excel with VBA

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Worthing, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Kicking someone out of excel with VBA

    Hi, im trying to work out how to remove someone remotely from excel if they leave a file open.

    I found this code:

    Workbook
    Please Login or Register  to view this content.
    Module code
    Please Login or Register  to view this content.
    but i cant get it to work, when i try to remove someone i get "runtime error 13, type missmatch" for line:
    Please Login or Register  to view this content.
    any ideas? im on excel 2007

    many thanks

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Kicking someone out of excel with VBA

    Hi,

    check the syntax of MsgBox here: http://msdn.microsoft.com/en-us/libr...=vs.60%29.aspx

    Looks like you should place the title argument at the end, after the buttons, not before.

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    04-22-2013
    Location
    Worthing, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Kicking someone out of excel with VBA

    Hi thanks for your reply, i dont think i fully understand sorry you might need to spell it out for me im still quite new to VB. you mean put the blnSaveChanges at the after the =vbYes?
    thanks

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Kicking someone out of excel with VBA

    Since you are quite new to VBA I'd advice not to use this (overcomplicated) code, unless you fully understand every part of it.



  5. #5
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Kicking someone out of excel with VBA

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-18-2008
    Location
    Scotland
    Posts
    156

    Re: Kicking someone out of excel with VBA

    Thanks for this, looks like there is some missing code in what you added danmarson, to be added to the module

    Please Login or Register  to view this content.
    Last edited by guerillaexcel; 07-31-2013 at 05:31 AM. Reason: typo

+ 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