I know where my macro is and the drawing pattern on my PC. But there are several of us on several sites who use this macro. It's difficult to discipline everyone. Some people move the macro and the drawing pattern and then complain that it doesn't work...
I want to know the path of the macro in the VB code to deduce the path of the drawing pattern
The function you're looking for is, in the case of a program, "Application.StartupPath" but I'm not sure if it works in the case of a VBA macro and if it works it's possible that it returns the path of the executable from which the macro is called is SW.
Maybe you can start by making your macro read-only and a hidden file in Windows and then at the beginning of your macro do a test on the existence of it with the expected path and if not existing, display a message indicating that this macro cannot work because not in the normal location, The undisciplined will perhaps discipline themselves by dint of taking the message....
I agree with d.roger if people move the files they must be big enough to fix their mistake otherwise from memory in VBA Excel I used CuDir to check the repair to see if with VBA Solidwokrs its works as well:)