1
votes

tldr; Password protected workbooks require a typed password on colleagues PC but not mine. I have a macro which runs through a mastersheet linking to external workbooks. The process is:

  1. it opens the workbook via link in cell
  2. iterates on the workbook
  3. save and close
  4. onto next in list

The workbooks which are opened all have the same password and using:

Workbooks.Open

with

Password:="password", WriteResPassword:="password"

works fine on my PC but the macro requires the password to be typed when I try running on a colleagues PC.

Google hasn't been much help so far. Could anyone help explain why the code types the password on mine but somehow doesn't on a different PC please. All help is appreciated greatly.

1
Where does the macro live? Specifically, which module does the code exist within? Is it in the workbook, worksheet, or a module? Did you accidentally save the code within a personal macro workbook that only exists on your computer?HackSlash
Hi HackSlash, it's in a module in my personal workbook, which was then exported to my colleague's personal workbookPureMaths

1 Answers

0
votes

Workbook specific macros should live inside the workbook that they do work upon.

Move the VBA module to the master workbook that opens the child workbooks. Test the code there and see if it works between different PCs.