![]() |
Serial No. of PC from VBA
Hi I hope somebody can help. I would like to be able to create a simple macro that will only allow certain users access to certain area's in an excel workbook which is used generally by staff. I have started by combining code (Vlookup) with a named range which is activated though an "workbook_open" procedure, but I would like to populate the named range with a list of the serial no. of the User's pc, thus is serial doesnt match then you don't get access. I am trying to avoid the use of passwords I hope somebody can follow this Regards John. |
Serial No. of PC from VBA
John,
Don't know how to get the PC Serial Number, but this simple function which I have used in the past returns the hard drive serial number Function DriveSerialNumber() As String Dim FSO As Object Set FSO = CreateObject("Scripting.FileSystemObject") DriveSerialNumber = Format(CDbl(FSO.Drives("C:").SerialNumber)) End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "John" wrote in message ... Hi, I hope somebody can help. I would like to be able to create a simple macro that will only allow certain users access to certain area's in an excel workbook which is used generally by staff. I have started by combining code (Vlookup) with a named range which is activated though an "workbook_open" procedure, but I would like to populate the named range with a list of the serial no. of the User's pc, thus is serial doesnt match then you don't get access. I am trying to avoid the use of passwords. I hope somebody can follow this ! Regards, John. |
All times are GMT +1. The time now is 05:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com