title: Prevent >1 person from running VBA macro at a time (shared wkb)
body: <p>What I'm aiming at is getting a list of all currently running scripts in order to check if other users aren't running the same VBA macro at the same time (and if yes, then stop the code etc., similar to what the OP of the below question wanted). This would be for a shared workbook (I learned it's not designed for this type of work, but I need to try it).</p>
  
  <p><a href="https://stackoverflow.com/a/36116091/5947935">https://stackoverflow.com/a/36116091/5947935</a> </p>
  
  <p>I've been trying to make the code in the above answer work in VBA, but it seems it's a vbs thing and I would like to avoid that.</p>
  
  <p>I'm not an expert to say the least, so I'm having trouble understanding how to get this to work in Excel VBA. I don't even know if it's possible at all.</p>
  
  <p>I've found this as well: <a href="https://stackoverflow.com/q/26277214">VBA Getting program names and task ID of running processes</a> and it works fine but it only lists the running processes.</p>
  
  <p>I've no idea however how to merge the two... or even if the WMI is the correct way to go.</p>
  
  <p>I'd appreciate any sort of help.</p>