0
Thanks

A few words of thanks would be greatly appreciated.

VBA Fill a comboBox with ActiveCell

VBA Fill a comboBox with ActiveCell

Issue

I have a little problem with Excel VBA.
I'd like to display text in a ComboBox proposals through the function ActiveCell. I put this code but it crashes at the 3rd line:

Feuil5.Range ("A6"). ComboBox2.AddItem Activate Do (Worksheets ("Table MRP). ActiveCell.Value) ActiveCell.Offset (3, 0). Activate Loop Until ActiveCell.Text =" "

This code should allow me to fill my ComboBox proposals with the values in cells A6, A9, A12 ...until there is an empty cell.

Thank you in advance for your help.

Solution

I could not get out of error messages, the following solution works

i = 6 Do While Worksheets ("Table MRP). Cells (i, 1) <>" "ComboBox2. AddItem (Worksheets (" Table MRP). Cells (i, 1). Value) i = i + 3 Loop

Note

Solved by Paf

0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « VBA Fill a comboBox with ActiveCell », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).