Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Problem in adding item to a checkbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Problem in adding item to a checkbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Problem in adding item to a checkbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Problem in adding item to a checkbox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:47 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:27 AM
adding a checkbox Pat Excel Discussion (Misc queries) 2 January 26th 07 03:05 PM
adding a,b,c,etc to end of item in call RHD3 Excel Discussion (Misc queries) 4 August 28th 06 11:18 PM
Adding a Checkbox in Cells Chaplain Doug Excel Discussion (Misc queries) 3 May 15th 06 04:00 PM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"