Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15648

Issue with password window

$
0
0
I have an issue. My code opens protected workbook in background - and it works fine, no issue, but when workbook is already open by other user, password window pops up - how to change that so user won't be able to see that password window? I add on error goto errhandler which contains that workbook is already open - it works fine when workbook is not protected, but with protected one this password window pops up.

Long story short:
when app opens a password protected workbook code works fine, but when app opens a password protected workbook that another user has open, it asks for the password?

Thank You in advance

Code:

on error goto errhan
Workbooks.Open Filename:= "C:\johndoe.xls", Password:="Password"
exit sub

errhan
messagebox.show("File is already open")

Any suggestions?

Viewing all articles
Browse latest Browse all 15648

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>