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
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You can add code to open/unprotect at the beginning of your macro, and protect/save at the end.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,937
Members
448,534
Latest member
benefuexx

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