Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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.



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
serial no Help!!!!!!!!!![_2_] Excel Discussion (Misc queries) 4 February 19th 09 01:11 PM
Serial No. Aju Excel Discussion (Misc queries) 5 March 31st 08 02:24 PM
cd serial gus Excel Programming 0 September 24th 03 01:26 PM
Serial I/O Karl Excel Programming 0 July 9th 03 04:09 AM


All times are GMT +1. The time now is 08:52 AM.

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"