View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Edwin Edwin is offline
external usenet poster
 
Posts: 21
Default Using cell as worksheet reference (macro)

Hi,

I would like to use the content of a cell as a worksheet reference. When the
macro is run, the name in the cell should open the worksheet of the same name
in another workbook.

So, in workbook A, I have in cell A1 "ed" (without the quotes). I want to
activate worksheet "ed" in workbook B. Workbook B is already open.

I have the following code in Workbook A, but is not working:

Windows("B.xls").Worksheets(Range("A1").Value).Act ivate

Any suggestions?

Ed