0

I need a pop up imput box that asks for a long date ex Friday, April 24, 2013 then adds the date to cell I2.

I Googled looking for something like this and found

Public Function AskForResult() As String
    Dim strUserResponse As String

    strUserResponse = InputBox("Please Enter a Long Date")

End Function

But I can't figure out how to assign the input to the cell I2.

Thanks

Community
  • 1
  • 1
xyz
  • 2,253
  • 10
  • 46
  • 68
  • Why do you want to use an inputbox and cater to lot of troubles? May I suggest a better [ALTERNATIVE?](http://stackoverflow.com/questions/12012206/formatting-mm-dd-yyyy-dates-in-textbox-in-vba/12013961#12013961) – Siddharth Rout Apr 27 '13 at 13:46
  • Hello Siddharth Rout, I am trying to use the alternitve method "Userform1.frm and Userform1.frx" but not shure how to assign input to a cell. Thanks – xyz Apr 27 '13 at 17:21
  • Check out the `CommandButton53_Click` code. You can use 'Range("A`").value = TextBox1.Text` – Siddharth Rout Apr 27 '13 at 17:55

1 Answers1

0

You could add this line after your InputBox line:

ActiveSheet.Cells(2, 9).Value = strUserResponse

the 2, 9 is the cell reference for I2 - row 2, column 9.

David
  • 1,222
  • 1
  • 8
  • 18