View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jim Jackson Jim Jackson is offline
external usenet poster
 
Posts: 324
Default another macro questions

I added a line:
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
to the code below. This applies the named range "target_cusip" to the cell
entered in the input box.

Res = InputBox("What is the cell address?")
Do
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
Exit Sub
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
Loop Until Res 0
ActiveWorkbook.Names.Add Name:="target_cusip", RefersToR1C1:=Range(Res)
Application.Goto Reference:="target_cusip"
ActiveCell.FormulaR1C1 = Res

Application.Run "RefireBLP"
ActiveWorkbook.Names.Add Name:="target_cusip"
'RefersToR1C1: x_ "=summary!+ " & rng.Address(ReferenceStyle:=xlR1C1)
Application.Run "RefireBLP"

--
Best wishes,

Jim