combo box show
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » COMBO BOX - SHOW FIRST LINE

COMBO BOX - SHOW FIRST LINE

resolvedResolved · Low Priority · Version 2003

replyReply Sun 9 Jan 2011, 17:03Delegate Tony said...

COMBO BOX - SHOW FIRST LINE

I have a form to enter a new row of data to spreadsheet using combo boxes. For many of the cells, it is possible that the new value is the same as the previous row. I add the previous value to the combobox as an option. Ideally I would like this to be visible rather than having to press the drop down arrow. If nothing has changed, I would like that value to be the defalt value taken when the form is closed and the next line to data added to the spreadsheet. If only one value is diferent on the form this would reduce the number of slections required to create the new record. I know this sounds like it would be better in a database, but there are a lot of calculations happening in other areas of the speadsheet.

Thanks

Tony

For upcoming training course dates see: Pricing & availability

replyReply Wed 19 Jan 2011, 09:55Trainer Anthony said...

RE: COMBO BOX - SHOW FIRST LINE

Hi Tony, thanks for your query. You need to set the ComboBox.text value to be equal to the current value in the relevant cell in the row that is already in there. Something like...

ComboBox1.text = Sheets("My Spreadsheet").Range("A2").Value

You could hard could these one by one, but it would be far more elegant to do it with a loop. However, these method should populate the ComboBox default values with the values of the cells already on the sheet.

Hope this helps,

Anthony

 

Please browse our web site to find out more about
excel computer training and other Microsoft training courses.

Excel tip:

Closing all your workbooks Quickly

Hold the SHIFT key down and using the mouse click on the file menu, it will now now CLOSE ALL rather than close. This closes all workbooks down but still leaves the application open.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard