creation of inputBox from combo box selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rheens
    New Member
    • Nov 2007
    • 1

    creation of inputBox from combo box selection

    Hi,

    I have an excel spreadsheet (windows 2000) where i wish to prompt the user to enter data in an input box based on the selection they have chosen from a combobox

    eg. When they select "Quarterly" from the combobox i want an input box to appear asking them "which month?" I have written the code based on the cell link value but this does not work

    Sub test()
    If Range("g4") = 2 Then InputBox "Please enter month of contact"
    End If
    End Sub.

    Any help would be appreciated as i am very new to this

    Cheers!
  • VijaySofist
    New Member
    • Jun 2007
    • 107

    #2
    Hi!

    Declare some string variable in the general section of the code window and pass the inputbox value in that string variable.

    For Example
    ----------------------
    Dim month as string

    Sub test()
    If Range("g4") = 2 Then
    month=InputBox ("Please enter month of contact")
    End If
    End Sub.

    Now set the month to particular cell value you want


    With Regards
    Vijay. R

    Comment

    Working...