View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
El Bee El Bee is offline
external usenet poster
 
Posts: 58
Default Workbook formula in a macro

I have a macro that opens another spreadsheet (spreadsheet B).
This second spreadsheet is named: "Projections 2006".

I create a var called WB2 which contains the name of this spreadsheet:
WB2 = ActiveWorkbook.Name

The macro then does some sorting and formatting on this spreadsheet.
I now want to add a formula in Spreadsheet A that points to a specific cell
in spreadsheet B (wb2)
I've tried several variations of the formula below and nothing works.

ActiveCell.FormulaR1C1 = "='[wb2]projections'!R3C5"

Can someone point me in the right direction?

Thanks,
El Bee