View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Melody4572 Melody4572 is offline
external usenet poster
 
Posts: 17
Default How do I make the formula see the message box answer?

I have a pop up message box as shown below

Dim Res As String
Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
Now I need the answer to that reqeust to be in this formula where 0 is
the cell address that I have just entered. (This is a simple formual, but I
need to see if I can get it to work before I use it in a more complicated
formula)

ActiveCell.FormulaR1C1 = "=R[-1]C[2] + 0 "
Range("D7").Select