Hello all,
Below is my code to allow the user to enter their name. Works fine!
However, can I modify the code to display the contents of a cell in the body of the box.
The box just shows “START FROM HERE”.
I would like to add to this the contents of cell R6 which is a number, so it would show
“START FROM HERE. The last number is 853". (cellR6 contains 853).
Can this be done.
It does not matter whether it shows in the header My INPUT Box or the body or the entry line as long as I can show it somewhere. I can get around it by using a message box but I then have two boxes displaying.
Thankyou
RC
Code:
Dim rng_Original As Excel.Range
Dim vnt_GetInput As Variant
Set rng_Original = ActiveCell
Application.Goto reference:="R3C17"
vnt_GetInput = Application _
.InputBox("START FROM HERE", _
"My INPUT Box", "Enter your name")
If vnt_GetInput <> False Then
ActiveSheet.Range("Q3").Value = vnt_GetInput
End If
rng_Original.Select
Set rng_Original = Nothing
Below is my code to allow the user to enter their name. Works fine!
However, can I modify the code to display the contents of a cell in the body of the box.
The box just shows “START FROM HERE”.
I would like to add to this the contents of cell R6 which is a number, so it would show
“START FROM HERE. The last number is 853". (cellR6 contains 853).
Can this be done.
It does not matter whether it shows in the header My INPUT Box or the body or the entry line as long as I can show it somewhere. I can get around it by using a message box but I then have two boxes displaying.
Thankyou
RC
Code:
Dim rng_Original As Excel.Range
Dim vnt_GetInput As Variant
Set rng_Original = ActiveCell
Application.Goto reference:="R3C17"
vnt_GetInput = Application _
.InputBox("START FROM HERE", _
"My INPUT Box", "Enter your name")
If vnt_GetInput <> False Then
ActiveSheet.Range("Q3").Value = vnt_GetInput
End If
rng_Original.Select
Set rng_Original = Nothing