I'm not sure if this will work. Try replacing the + with & Norman
On Thu, May 28, 2009 at 10:19 AM, Ahmet Yalcin <ahmetyalc...@gmail.com>wrote: > Hello, > > Please help me with the right syntax writing the below > ActiveCell.FormulaR1C1 = "='[2008-04 BIL.xls]+Company(x)'!D7" line. I wish > to insert the Sheet name as I did (Company(x) ) but keep on getting an > error. > > Thank you in advance > > Regards > Ahmet > > > --------------------------------------------- > Dim Company(3) > > Company(1) = "KM" > Company(2) = "KS" > Company(3) = "KD" > > For x= 1 to 3 > . > . > . > > ActiveCell.FormulaR1C1 = "='[2008-04 BIL.xls]+Company(x)'!D7" > . > . > . > Next x > > > > --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---