Hi all!
I'm using the following code to open a workbook.
fPath & fName are, of course, specified before hand but I've omitted that for simplicity.
The workbook being opened, however, is password protected (which, when running the code, it asks for after reaching the above line). Unfortunately I'm a little stumped on how to actually enter the password using VBA (instead of entering manually). This isn't usually a problem as
usually works.
But in my case it doesn't seem to play nicely with the fPath & fName method of opening a file (which I must use for other reasons unfortunately). Screen updating is also off if that makes any difference.
Thanks for the help!
I'm using the following code to open a workbook.
VBA Code:
Workbooks.Open (fPath & fName)
fPath & fName are, of course, specified before hand but I've omitted that for simplicity.
The workbook being opened, however, is password protected (which, when running the code, it asks for after reaching the above line). Unfortunately I'm a little stumped on how to actually enter the password using VBA (instead of entering manually). This isn't usually a problem as
VBA Code:
Workbooks("Book1").Unprotect "password"
But in my case it doesn't seem to play nicely with the fPath & fName method of opening a file (which I must use for other reasons unfortunately). Screen updating is also off if that makes any difference.
Thanks for the help!