By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,058 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,058 IT Pros & Developers. It's quick & easy.

creation of inputBox from combo box selection

P: 1
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!
Dec 4 '07 #1
Share this Question
Share on Google+
1 Reply


VijaySofist
100+
P: 107
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
Dec 6 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.