Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a code
Dim i As Intege r = Range("AR5000").End(xlUp).Ro For i = 2 To ComboBox3.AddItem CStr(Sheet1.Range("AR" + CStr(i)).Value Nex whenever I run, it gives runtime error 70: Permission denied I want to add the entries in column AR to the dropdown list of the combobox. I cannot use listfillrange as the data will be lost when entries in AR change . AR stores the data resulting from a query TI Shilps |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I looks like you have not qualified the combobox. For example:
Userform1.ComboBox3.AddItem CStr(Sheet1.Range("AR" + CStr(i)).Value) Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Shilps" wrote in message ... I have a code: Dim i As Integer r = Range("AR5000").End(xlUp).Row For i = 2 To r ComboBox3.AddItem CStr(Sheet1.Range("AR" + CStr(i)).Value) Next whenever I run, it gives runtime error 70: Permission denied. I want to add the entries in column AR to the dropdown list of the combobox. I cannot use listfillrange as the data will be lost when entries in AR change . AR stores the data resulting from a query. TIH Shilps |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is ListFillRange being used? If so, ListFillRange and AddItem can't be used
simultaneously. "Shilps" wrote in message ... I have a code: Dim i As Integer r = Range("AR5000").End(xlUp).Row For i = 2 To r ComboBox3.AddItem CStr(Sheet1.Range("AR" + CStr(i)).Value) Next whenever I run, it gives runtime error 70: Permission denied. I want to add the entries in column AR to the dropdown list of the combobox. I cannot use listfillrange as the data will be lost when entries in AR change . AR stores the data resulting from a query. TIH Shilps |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am sorry Bob, but qualiifying the ComboBox didn't help:
I modified the code to Dim i As Intege r = Range("AR5000").End(xlUp).Ro For i = 2 To Worksheets("QUERY_BUILDER").ComboBox3.AddItem CStr(Sheet1.Range("AR" + CStr(i)).Value Nex But I am getting the same error. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding item in listbox | Excel Worksheet Functions | |||
Adding item in listbox | Excel Worksheet Functions | |||
adding a checkbox | Excel Discussion (Misc queries) | |||
adding a,b,c,etc to end of item in call | Excel Discussion (Misc queries) | |||
Adding a Checkbox in Cells | Excel Discussion (Misc queries) |