Excel Kicking a user out from Mr Excel


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Kicking a user out
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

vbsteve
Board Regular


Joined: 11 Dec 2003
Posts: 41
Location: UK
Flag: England

Status: Offline

 Reply with quote  

Kicking a user out

Hi all

Is there anyway of being able to remove a user from a workbook. The problem is i have a user that have set their username as setup and have sat in one of my files for ages.

Thanks icon_banghead.gif
_________________
...It can't be that complicated. Can it?

Post Thu Apr 01, 2004 2:30 pm 
 View user's profile Send private message

KniteMare
Board Master


Joined: 05 Mar 2002
Posts: 234
Location: Connecticut
Flag: Usa

Status: Offline

 Reply with quote  

Re: Kicking a user out

This may be what your trying to do.

CODE FOLLOWS

Private Sub Workbook_Open()
If Application.UserName = "TheUsersNameGoesHere" Then
ThisWorkbook.Saved = True
ThisWorkbook.Close 'Close just this workbook
Application.Quit 'Or quit EXCEL completly
End If
End Sub

CODE ENDS

Place this in the WorkBook Module of the workbook in question

Yours in EXCELent Frustration

KniteMare

Post Thu Apr 01, 2004 2:53 pm 
 View user's profile Send private message Visit poster's website

vbsteve
Board Regular


Joined: 11 Dec 2003
Posts: 41
Location: UK
Flag: England

Status: Offline

 Reply with quote  

Re: Kicking a user out

Thanks for your help, but the user is already in the file so its readonly! Fortunely i have a macro to log the users details so once the come out ill catch them out. Its just annoying in the mean time.

thanks again.
_________________
...It can't be that complicated. Can it?

Post Thu Apr 01, 2004 3:26 pm 
 View user's profile Send private message

SGH
Board Regular


Joined: 11 Dec 2003
Posts: 46

Flag: England

Status: Offline

 Reply with quote  

Re: Kicking a user out

I'd also like to know how to do this if a workbook is read-only.
_________________
To infinity and beyond

Post Fri Apr 02, 2004 10:13 am 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.