View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default Code instead of foumula.

When the input box is filled, just assihn the modified formula to the cell.
Assuming A1 is the cell:

newNum = ' number from input box
Range("A1").Formula = "='P:\NAP Office\VT-31 Classes\[VT31 FY 04-" _
& Format(newNum,"00") & ".xls]Tracker'!C9"

You may want to change the Format part with another pattern. The one above
will returns 01, 02, .. 32, for entry 1,2,32.

Regards,
Sebastien


"Erik" wrote:

I have the following formula in a couple of cells and want to use code instead.

='P:\NAP Office\VT-31 Classes\[VT31 FY 04-37.xls]Tracker'!C9

The formula refers to another workbook on another drive. The reason I want
to use code instead is that I want to be able to change the reference at the
04-37 portion of the formula through an input box to other numbers in the
same general format ie. 04-##. Any thoughts?
Erik