Please help with AddItem method
If you didn't get the answer you wanted the I assume you
know the answer. On the other hand, perhaps re-phrase the
question. This news group has a lot of people that try
very harde to provide solutions.
The following code works fine - I tidied your up and was
not able to reproduce your problem
Sub LoadCB6()
Dim read3 As Long
read3 = 2
With Worksheets("QUERY_BUILDER")
.ComboBox6.Clear
Do While .Cells(read3, "AR") < ""
.ComboBox6.AddItem .Cells(read3, "AR").Value
read3 = read3 + 1
Loop
End With
End Sub
-----Original Message-----
Hi,
I have posted this query before but got no response that
would solve my problem
I have a code as below which when I run gives "Run-Time
Error 70: Permission Denied" while it is working fine
with other comboxes.
read3 = 2
While Worksheets("QUERY_BUILDER").Range("AR" + CStr
(read3)).Value < Empty
Worksheets("QUERY_BUILDER").ComboBox6.AddItem CStr
(Worksheets("QUERY_BUILDER").Range("AR" + CStr
(read3)).Value)
read3 = read3 + 1
Wend
Whenever I run this code it gives "Run-Time error"
Permission Denied.
This code is working for other comboboxes.
Please tell me why is this behaving this way and what
should I do?
TIH
.
|