LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default No dupes

I am trying to get a list box to run in form6. I am going over 2000 rows of
information and I don't want the mix types duplicated. I want to have the no
dupes run on Column B26 to B2500. I am using this macro and when it runs I
get an error 70 "Permission denied". I would appreciate it if someone could
help....Thank you in advance.

Here is the macro:

Sub startLast4()

sheets("test database").unprotect ~~~ this is where the information is in
Column B
Dim allcells As Range, cell As Range
Dim nodupes As New Collection

On Error Resume Next
For Each cell In Range("B27:B2500")
nodupes.Add cell.Value, CStr(cell.Value)
Next cell
On Error GoTo 0

For Each Item In nodupes
UserForm6.ListBox1.AddItem Item
Next Item

UserForm6.Show

End Sub

Eric
 
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
vlookup & sum? or maybe summing dupes? blswes Excel Discussion (Misc queries) 1 September 22nd 08 04:31 PM
macro for dupes shaji Excel Discussion (Misc queries) 2 June 17th 08 04:51 PM
Checking for Dupes TKnTexas Excel Discussion (Misc queries) 4 November 3rd 06 02:43 AM
Marking Dupes GregR Excel Programming 7 January 10th 06 02:17 AM
No permit dupes in listbox... sal21[_96_] Excel Programming 0 January 4th 06 04:15 PM


All times are GMT +1. The time now is 02:38 PM.

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"