Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've created to arrays that hold the sheet names for a worksheet,
mySheetList() which holds the natural sheet order and mySheetListAlpha() which holds a the sheet names alphabetically ordered. I want to offer the user a form containing a listbox with the sheetnames and two buttons on the form that the user select either natural order or alphabetically ordered. By clicking on the buttons, the listbox is dynamically updated with either one of the two arrays. I call a list box via UserForm_Initialize() and populate the list with: ListBox1.List = mySheetList This part works well (I can also get the listbox populated alphabetically with ListBox1.List = mySheetListAlpha). My problem lies in trying to update the listbox with the second array. On the form is a command button with the following code Listbox.Clear For X = LBound(mySheetListAlpha) To UBound(mySheetListAlpha) ListBox1.AddItem mySheetListAlpha(X) Next The listbox.clear command clears the listbox but the second line of code causes Type Mismatch error. Can someone tell me how I can repopulate the listbox with values held in the second array. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
type mismatch error | Excel Programming | |||
Type mismatch error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Type Mismatch error | Excel Programming |