LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Trying to give a cell a formula

I use WinXP and Excel 2000.

In a program I would like set this:

='C:\jans data\jan programming\excel\administracion velarde\[Expensas marzo
2004.xls]PL general'!$M10

as a cell's formula.

The cell links to a cell in another workbook.

I have tried:

Worksheets("Resumen").Cells(4, 3 * i).FormulaR1C1 = "='" & ccarpeta & "[" &
cfilename & "]PL general'!$M10"

where ccarpeta = "C:\jans data\jan programming\excel\administracion
velarde\"
and cfilename = "Expensas marzo 2004.xls"

but I get runtime error '1004'.

It seems it doesn't like the apostrophes ('), which is strange since it does
accept them when I copy and paste the string into the formula bar by hand.

I have tried many other string variations, but with no luck.

When I try: Worksheets("Resumen").Cells(4, 3 * i).FormulaR1C1 = "=" &
ccarpeta,
I get "=I:I:\jans data\jan programming\excel\administracion velarde\". Where
did those Is come from?

Appreciate any help on this!

Regards,

Jan Nordgreen


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell formula that will give back the address of the cursor? Byron Excel Worksheet Functions 1 February 25th 10 03:04 AM
Can Formula Auditing give cell refs to other sheets? [email protected] New Users to Excel 4 October 24th 07 03:56 PM
How do I use a formula to give me a cell reference in excel? CJWilson Excel Worksheet Functions 4 April 2nd 07 12:02 PM
Give RELEVANT responses to questions. DO NOT give usless list pmartin Excel Worksheet Functions 2 July 6th 06 06:08 PM
Want to be able to click on a cell and have a list box appear to give values to populate a cell Richard Zellmer Excel Programming 2 September 16th 03 11:12 PM


All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"