View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Open a workbook using a stored name

Refer the workbooks as an object...

Dim wbBook As Workbook
'To reference a open workbook (already saved)
Set wbMain = Workbooks("WBMain.xls")

'Now where ever you are you can reference the range as
Msgbox wbMain.Sheets("Sheet1").Range("A1")

If this post helps click Yes
---------------
Jacob Skaria


"JB" wrote:

I have several workbooks (call them WB1 and WB2) that moves data to a central
workbook (call it WBMain and its name never changes). Once WB1 or WB2 has
passed their data it leaves WBMain activated. At the time WBMain was
activated the name and path for WB1 or WB2 was stored on WBMain in named
cells (WBName & WBPath). My problem, although it should not happen, if the
user closes WB1 or WB2 while in WBMain then when required to go back to WB1
or WB2 it must do so using the name and path stored on WBMain. I can't seem
to get it done.