I cannot address the Excel part. Never played with Excel macros.
For Access, if an application has been secured and set up so that you turned off the bypass keys and only distributed an ACCDE or MDE (compiled) file and set it up to use a switchboard or dispatcher form, you can have the Form_Open event code of the switchboard perform this check. The trick will be to have a way to actually initially load the MAC address for the machine you wanted to be able to run the code.
You can find out about the above topics by doing a SEARCH on this forum (see the thin blue ribbon near the top of the page) on "switchboard" "opening form" "securing a database" "compiling a database"
You should, however, be aware that you cannot completely stop any of this. You can only make it harder to crack so that you deter MOST users. If someone steals the code and imports its parts to a new, blank database (rather than launching the original app file), that person can undo any of the "hardening" that you tried to do. It isn't pretty but it IS a fact of life.