Excel 2007 referencing other wb

M

MorgSz

Hello!
I am using a macro which references other sheets in other wb. In Excel
2003, I only had to update the macro and it would run fine. Now, although I
have updated the macro and eliminated the macro security on Excel 2007, I
still must update the file *manually* for each cell (defeating the purpose of
the macro...). I have 4 sheets, each with over 400 cells which must
reference other workbooks. Help!

I'm attaching a snippet of code below:

Sub YTD()

'MACROSUBTITLE
Sheets("OpenSheetName").Select

' Part 1

Range("E11").Select
ActiveCell.FormulaR1C1 = _
"='C:\FolderName\[FileName.xls]SheetName'!R13C5"
Range("F11").Select
ActiveCell.FormulaR1C1 = _
"='C:\FolderName\[FileName.xls]SheetName'!R13C6"

....And so on...

Thank you in advance for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top