Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Allow certain users to edit certain rows?


Hi Geof,

Actually, my question was how to create different logins for differen
people - they won't access it concurrently.

Is there a built-in way, or do I have to pop up a form to ask for it?

Thanks!

Davi

--
hay777
-----------------------------------------------------------------------
hay7777's Profile: http://www.excelforum.com/member.php...fo&userid=1506
View this thread: http://www.excelforum.com/showthread.php?threadid=26693

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Allow certain users to edit certain rows?

David,
If you're on a network and if all your users have network
ids then this should work:
'Goes at the top of the module.
Declare Function GetUserName Lib "advapi32.dll"
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As
Long) As Long

Then get the id with:

Public Function GetCurrentUserName() As String

Dim lpBuff As String * 25
Dim ret As Long, Username As String

On Error GoTo Err_GetCurrentUserName

ret = GetUserName(lpBuff, 25)
'Username is global in scope.
Username = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
GetCurrentUserName = Username & ""

Exit_GetCurrentUserName:
Exit Function

Err_GetCurrentUserName:
MsgBox Err.Description
Resume Exit_GetCurrentUserName
End Function

Call GetCurrentUserName in the Workbook_Open event. Match
the name up to some hidden list. There's no prompting to
this call. No password either, though. If you want to get
that fancy and professional-looking, then yes, use a form.

If you're not on a network, make a logon form and match to
your hidden list.

The API call just saves the user from entering an id.
Geof.
-----Original Message-----

Hi Geof,

Actually, my question was how to create different logins

for different
people - they won't access it concurrently.

Is there a built-in way, or do I have to pop up a form to

ask for it?

Thanks!

David


--
hay7777
----------------------------------------------------------

--------------
hay7777's Profile: http://www.excelforum.com/member.php?

action=getinfo&userid=15066
View this thread:

http://www.excelforum.com/showthread...hreadid=266937

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
allow some users to edit only some columns serve Excel Worksheet Functions 3 December 15th 06 08:13 PM
allow users to edit range Lp12 Excel Discussion (Misc queries) 0 March 21st 06 12:20 PM
Allow certain users to edit certain rows? hay7777[_3_] Excel Programming 1 October 7th 04 02:51 AM
Allow certain users to edit certain rows? hay7777[_2_] Excel Programming 1 October 6th 04 08:41 PM
Allow certain users to edit certain rows? hay7777 Excel Programming 2 October 6th 04 06:07 PM


All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"