Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start up security
Is it possible to enter code into an excel file that looks for a network user
name as the file opens. If your user name is not on the network, then the file will not open. I realise that security for Excel is dodgy at the best of times, but it is a start. I have set range passwords for the worksheets, but need to prevent the file from opening. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Start up security
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function fOSUserName() As String ' Returns the network login name Dim lngLen As Long, lngX As Long Dim strUserName As String strUserName = String$(254, 0) lngLen = 255 lngX = apiGetUserName(strUserName, lngLen) If lngX < 0 Then fOSUserName = Left$(strUserName, lngLen - 1) Else fOSUserName = "" End If End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
start:1 and start:2 - how did i get 2 copies? | Excel Discussion (Misc queries) | |||
start learning Excel/VBA, where to start from? Any online video lectures? | Excel Programming | |||
OT :Start your own online business today !start making dollars | Excel Discussion (Misc queries) | |||
Start spreadsheet with WinXP start | Excel Worksheet Functions | |||
Macro Start Autorun without Enable security | Excel Programming |