Link an Inputbox to a cell
Solved
manuvendee
Posted messages
14
Status
Member
-
manuvendee -
manuvendee -
Bonjour,
I would like the input from an InputBox to be sent to a cell in the open workbook.
I can create the input box with the text: Please enter the date this table refers to. The format must be dd/mm/yyyy
which gives:
Sub dialog_box()
variable = InputBox$("Please enter the date this table refers to. The format must be dd/mm/yyyy")
End Sub
but I can't make the link between the answer and a cell of my choice.
Does anyone know how to do this?
Thanks in advance
I would like the input from an InputBox to be sent to a cell in the open workbook.
I can create the input box with the text: Please enter the date this table refers to. The format must be dd/mm/yyyy
which gives:
Sub dialog_box()
variable = InputBox$("Please enter the date this table refers to. The format must be dd/mm/yyyy")
End Sub
but I can't make the link between the answer and a cell of my choice.
Does anyone know how to do this?
Thanks in advance
Configuration: Windows XP Internet Explorer 6.0
5 answers
Hello. It should look something like this:
Sub dialog_box()
variable = InputBox$("Please enter the date to which this table refers. The format must be dd/mm/yyyy")
sheet.cells("A1").value = variable
End Sub
Sub dialog_box()
variable = InputBox$("Please enter the date to which this table refers. The format must be dd/mm/yyyy")
sheet.cells("A1").value = variable
End Sub
Thank you for your help!
It didn't work, but I modified it and it works with
Sub dialogue_box()
variable = InputBox$("Please enter the date to which this table refers. The format must be dd/mm/yyyy")
Sheet1.Range("A1").Value = variable
End Sub
Thank you for putting me on the right track! And thank you for the quick response.
It didn't work, but I modified it and it works with
Sub dialogue_box()
variable = InputBox$("Please enter the date to which this table refers. The format must be dd/mm/yyyy")
Sheet1.Range("A1").Value = variable
End Sub
Thank you for putting me on the right track! And thank you for the quick response.
Hello, I have a small problem regarding your discussion. I created my InputBox and I can put the result into the cell of my choice, A1 for example. But beforehand, I would like the user to just click on this cell A1 for the InputBox to open automatically so that they can enter their result, and I can't manage to do that. Can you help me??
Thank you very much
Thank you very much
I confess that I don't know how to do it!
But it seems a bit strange to click on cell A1 to bring up a textbox; to enter a value in this box to send the value back to cell A1.
It would be just as easy to enter the value directly into cell A1!
But well, in my opinion, I didn't understand at all.
See you!
But it seems a bit strange to click on cell A1 to bring up a textbox; to enter a value in this box to send the value back to cell A1.
It would be just as easy to enter the value directly into cell A1!
But well, in my opinion, I didn't understand at all.
See you!