Hello All,
I have two sub procedures. In sub procedure1 i call sub procedure 2 . In sub procedure 2 I have an inputbox that asks users to enter a city name and stores that as a variable and then some other operations are performed. when I return to sub procedure 1 I would like to insert the stored variable name i.e city name that was captured in sub procedure 1 in a worksheet cell D2.
but its not working as expected, any help is apprecaited.
Here is the code:
I have two sub procedures. In sub procedure1 i call sub procedure 2 . In sub procedure 2 I have an inputbox that asks users to enter a city name and stores that as a variable and then some other operations are performed. when I return to sub procedure 1 I would like to insert the stored variable name i.e city name that was captured in sub procedure 1 in a worksheet cell D2.
but its not working as expected, any help is apprecaited.
Here is the code:
VBA Code:
Public Sub sub1()
enter_city
Worksheets("Pivot & Reporting").Range("D2").Value = city
End Sub
Sub enter_city()
city = InputBox("Please enter City/town or Area name for which Drive Route has been created", "Drive Route Length Statistics Creation", "Type here")
End Sub