Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Can a variable workbook be embedded into an Excel funtion?

Jeff,

Dim wbk1 as String, wbk2 as String, wsh1 as String, wsh2 as String

wbk1 = "Myworkbook"
wsh1 = "Mysheet"

Range("A1").Formula = "=[" & wbk1 & ".xls]" & wsh1 & "!A1"

start from here and build.

You could also Dim these as Workbook and Worksheet objects to change
Workbooks("Myworkbook.xls").Sheets("Mysheet").Rang e("A1")
to
Set wbk1 = Workbooks("Myworkbook.xls")
Set wsh1 = Sheets("Mysheet")
wbk1.wsh1.Range("A1")

steve

"JeffFinnan" wrote in message
...
Previously, I had queried about comparing ranges as to whether they were
exactly the same as each other

Tom Ogilvy had suggested using something like this:


? Evaluate("=NOT(OR(A1:B10<C1:D10))")
False

Range("C1:D10").Value = Range("A1:B10").Value
? Evaluate("=NOT(OR(A1:B10<C1:D10))")
True The question I have now is how can I use a variable name or some

separate
worksheet references for the ranges within the Excel function? By this I

mean
each range could be a variable workbook and work sheet as well as a

variable
range.

Thanks,
Jeff



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
Save an embedded workbook in PPT Jose Mourinho Excel Discussion (Misc queries) 2 July 8th 07 04:01 PM
If funtion in Excel amoreena Excel Worksheet Functions 2 May 8th 07 11:22 PM
Excel Funtion Reen Excel Worksheet Functions 2 December 21st 06 01:28 AM
Create an external reference link with embedded variable Greentree Excel Worksheet Functions 1 October 9th 05 07:46 PM
Can a variable workbook be embedded into an Excel funtion? Tom Ogilvy Excel Programming 1 August 11th 03 08:38 PM


All times are GMT +1. The time now is 07:01 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"