I'm very much a 'Newbie' to Excel VBA and I'm having all sorts of problems, particularly with populating multiple combo-boxes on the same 'UserForm'.
My 'UserForm' contains 2 comboboxes - cbIdentS and cbCalRun, can anyone tell me why this code doesn't work? It throws up a 'Compile Error: Method or data member not found'.
I don't know why those "[COLOR]" references have appreared, I suspect I haven't added the code to the message properly - another Newbie problem?
Private Sub UserForm_Initialize() Dim cell As Range Dim Rng As Range With cbCalRun ThisWorkbook.Sheet3 ("Calibration") Set Rng = .Range("A2", .Range("A2").End(xlDown)) End With For Each cell In Rng.Cells Me.cbCalRun.AddItem cell.Value Next cell With cbIdentS ThisWorkbook.Sheet1 ("Scope_of_Work") Set Rng = .Range("B2", .Range("B2").End(xlDown)) End With For Each cell In Rng.Cells Me.cbIdentS.AddItem cell.Value Next cell End Sub
I have searched through related topics, but can't find an answer that works, any help would be much appreciated.