Excel VBA - Ignore password prompts -


i have code cycles through several workbooks , makes changes headers. workbooks unprotected, linked workbook requires password. know password, not needed complete task need done.

basically, part of code opens unprotected workbook need make changes to:

workbooks.open filename:="c:\myfile.xlsm" 

when runs, pop-up message says differentfile.xlsx protected , asks password.

if close out of message rest of code runs fine.

is there way have vba automatically close message or ignore password requests? don't want open read-only since code makes , saves changes.

you can include password:

workbooks.open filename:= "c:\myfile.xlsm", password:="yourpasswordhere" 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -