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

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,494
Office Version
  1. 2016
Platform
  1. Windows
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
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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 *******s out there).
Hope that helps a bit,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top