Open File If MAC Address Matches With That Mentioned In The Code

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
754
Hello Friends,

Is it possible to Open a file only for specific computers.

A VBA code for let’s say 3 MAC Addresses is linked with Workbook Open Event & the file should open for those 3 computers who’s MAC Addresses are there in the code - otherwise a msg box should prompt saying that you are not allowed to open the file.

Regards,

Humayun
 

Rijnsent

Well-known Member
Joined
Oct 17, 2005
Messages
1,124
Office Version
365
Platform
Windows
Hi Humayun,
you can cover that with some VBA, but a skilled person could circumvent that protection.
You can us the Workbook_Open() sub to run some code on opening that excel. In that module you can e.g. use this code to get the MAC address: https://excelhub.org/mac-address-lookup-in-excel-vba-code/ and match it with your list. Having said that, if the user simply refuses to run macros, the workbook wil open, but that protection won't work. I guess an easier way is to simply password-protect the file and give the users that password (but there are online a couple of excel-password crackers out there).
Hope that helps a bit,
Koen
 

Forum statistics

Threads
1,078,500
Messages
5,340,743
Members
399,393
Latest member
farlow

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top