Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Call a file name from within string

Similar to my last post, I want to be able to change a parameter
within a calculation.

I have tried to modify code that I used for a similar event from
before but I am stumped.

The code is as follows: -

Dim extract As String
ActiveCell.FormulaR1C1 = _
extract = InputBox("Please enter Version Control Master file", "File
Name")
ActiveCell.FormulaR1C1 = _
"=+'[& extract &]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"

Basically I am calling cell C9 from one sheet whose name changes daily
and subtracting the value in C9 on the other sheet which does not
change.

Responses/guidance gratefully received.
Thank you

Mark

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Call a file name from within string

One way:

ActiveCell.FormulaR1C1 = _
"='[" & extract & "]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"

In article .com,
wrote:

ActiveCell.FormulaR1C1 = _
"=+'[& extract &]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Call a file name from within string

Je,
Tried your suggestion , comes up with a debug error.

I also tried this: -

ActiveCell.FormulaR1C1 = _
"='[" & extract & ".xls""]Static Summary'!R9C3-'[Version
Control Master 20070815.xls]Static Summary

but that just debugs too.

Mark


On 18 Sep, 13:18, JE McGimpsey wrote:
One way:

ActiveCell.FormulaR1C1 = _
"='[" & extract & "]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"

In article .com,



wrote:
ActiveCell.FormulaR1C1 = _
"=+'[& extract &]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Call a file name from within string

Not sure what 'debug' error you're getting - I'd expect an application
error.

Just noticed that you left out the last exclamation point. Try:

ActiveCell.FormulaR1C1 = _
"='[" & extract & "]Static Summary'!R9C3-'[Version Control
Master 20070815.xls]Static Summary'!R9C3"


='[Workbook1.xls]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'!R9C3
In article .com,
wrote:

Je,
Tried your suggestion , comes up with a debug error.

I also tried this: -

ActiveCell.FormulaR1C1 = _
"='[" & extract & ".xls""]Static Summary'!R9C3-'[Version
Control Master 20070815.xls]Static Summary

but that just debugs too.

Mark


On 18 Sep, 13:18, JE McGimpsey wrote:
One way:

ActiveCell.FormulaR1C1 = _
"='[" & extract & "]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"

In article .com,



wrote:
ActiveCell.FormulaR1C1 = _
"=+'[& extract &]Static Summary'!R9C3-'[Version Control Master
20070815.xls]Static Summary'R9C3"- Hide quoted text -


- Show quoted text -

Reply
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
Excel: Use pic location string to call up picuture in cell? vloh28 Excel Discussion (Misc queries) 1 October 30th 07 12:42 AM
Call UDF by String Name Hokievandal Excel Programming 2 May 25th 07 08:09 PM
How do I call a dynamically created String in a VBA Sub [email protected] Excel Programming 4 December 25th 06 02:36 PM
sub call with string aran Excel Programming 5 June 18th 05 05:33 PM
Excel4 Call to get Function String Rob Bovey Excel Programming 6 September 24th 03 06:34 PM


All times are GMT +1. The time now is 06:27 PM.

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

About Us

"It's about Microsoft Excel"