[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

How to use drop down lists in Worksheets using VBA

Khurram

12/20/2006 10:36:00 AM

Hi all,
I literally have about 4 days of VBA experience so please bear with me.
I'm having problems creating List/Combo boxes using a macro. Devising
a macro which, on execution prompts the user for the location of a
source excel file containing the raw data. This I've done using
Application.GetOpenFilename and it works. Once the file is selected I
need the user to promted by two dialog boxes, one after the other.

1) First dialog box presents the user with a drop down list containing
entries for the 12 months ("January", "February"...."December"). The
Dialog box comes with an OK and Cancel button.

2) Second dialog box presents the user with a drop down list containing
entries for years in the future upto 2010 ("2006", "2007"...."2010").
The Dialog box again comes with an OK and Cancel button.

The macro will then identify which values have been selected,
concatenate these as one string value and populate a Cell (assume Cell
A5) with this value thus making it the title. Finally contents of a
sheet from the source file and copied and pasted to Workbook where the
application is running from.

Please help on how to create such drop down lists as I keep trying to
create a ComboBox the same was as InputBox or MsgBox and that does not
seem to work. Desperately need help.

Thank you kindly
Khurram