disable dialog box to input password in VBProject

aryan_hr

Board Regular
Joined
Feb 19, 2002
Messages
222
Hi,

I have written a program in Excel (VBA). The program consists of three
workbooks (XLA format), one is main program and other two workbooks
are added to it as reference. And all of the three workbooks have
password. My problem is: When I add a workbook to main workbook as
reference, the main program shows a dialog box for input password that
I cancel it and I don't enter the password. How can I avoid showing
this dialog box?

Best Regards,
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi,

Sorry, but I don't quite follow what you are doing. Could you post the code that you are using?

(Have you tried the usual Application.DisplayAlerts=False?)
 
Upvote 0
Thanks for the reply,

I had tried Application.DisplayAlerts=False, but no change!!!
I have two workbooks, W1.xla and W2.xla and both them protect by passwords.
When I add W2.xla to W1.xla as reference:
Workbooks("W1.xla ").VBProject.References.AddFromFile "C:\W2.xla"
a dialog box appears and prompts for input password. What can I do to avoid this dialog box?


Best Regards,
 
Upvote 0

Forum statistics

Threads
1,221,695
Messages
6,161,360
Members
451,699
Latest member
sfairbro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top