Formula Linking Question

rolandek

Board Regular
Joined
Dec 27, 2003
Messages
95
Hi Guys (again and again)

I have a macros that feeds in 100s of formulas into a template that it opens (xl). What happens is that the Macro takes the input from some drop downs like , I pick January, Actual..etc and the Macro opens the Template Report and fills formulas accrodingly. These formulas are links to other Xl files. The problem is tha by design I had to secure the files with passwords. So I ended up opening every file before I fill the formulas and closing it after I fill the formulas.

Is there a way around this?
Pls advise and Thanks
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
You can add code to open/unprotect at the beginning of your macro, and protect/save at the end.
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
It depends on how you are entering the formulas, but this worked for me:

Code:
Sub Test()
    SendKeys " {Enter}"
    Range("A1").FormulaR1C1 = "='P:\TEMP\MrExcel\FileLinksPWord\[Source.xls]Sheet1'!RC"
End Sub

Workbook Source .xls had a single space as the password to modify. Adjust the code to suit.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,470
Messages
5,601,840
Members
414,479
Latest member
Beau the dog

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
Top