Initializing Combobox in a Userform
Dear Experts,
I have a combobox in a userform that I want to initialize from a list of names that is on the sheet called "Stock". What is the easiest way to do this? Thanks in advance. Neal |
Initializing Combobox in a Userform
This code reads the data from the sheet and initializes a combobox named
cboMake:- Private Sub UserForm_Initialize() Application.ScreenUpdating = False Worksheets(1).Activate Cells(1, 1).Select Do If IsEmpty(ActiveCell) = False Then With cboMake .AddItem ActiveCell End With ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True End Sub "Neal" wrote in message ... Dear Experts, I have a combobox in a userform that I want to initialize from a list of names that is on the sheet called "Stock". What is the easiest way to do this? Thanks in advance. Neal |
Initializing Combobox in a Userform
Thanks for the suggestion. I will try it.
Neal -----Original Message----- This code reads the data from the sheet and initializes a combobox named cboMake:- Private Sub UserForm_Initialize() Application.ScreenUpdating = False Worksheets(1).Activate Cells(1, 1).Select Do If IsEmpty(ActiveCell) = False Then With cboMake .AddItem ActiveCell End With ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True End Sub "Neal" wrote in message ... Dear Experts, I have a combobox in a userform that I want to initialize from a list of names that is on the sheet called "Stock". What is the easiest way to do this? Thanks in advance. Neal . |
All times are GMT +1. The time now is 07:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com