#1   Report Post  
browie
 
Posts: n/a
Default Duplicates

Hi all,


I am looking for help with some code I have a combobox which I have linked
to column"a" on worksheet 150 which is called "dayoptions".

The problem I have is when someone exits this box it has the value go to 2
places 1 is the person's sheet
so I use the activesheet code

The problem I am having is if someone chooses a value which is already in
this list it copies the name and causes a duplicate in this record. How can
I stop this from happening?
here is the code again.

Private Sub CommandButton1_Click()
R = 46
ActiveSheet.Cells(R, 2).Value = UCase(ComboBox1.Text)
R = 46
ActiveSheet.Cells(R, 4).Value = UCase(TextBox1.Text)
R = 46
ActiveSheet.Cells(R, 3).Value = UCase(TextBox4.Text)
R = 46
ActiveSheet.Cells(R, 5).Value = UCase(TextBox6.Text)

R = 46
ActiveSheet.Cells(R, 6).Value = UCase(ComboBox2.Text)
R = 46
ActiveSheet.Cells(R, 8).Value = UCase(TextBox2.Text)
Sheet150.Range("A1").Insert
R = 46
ActiveSheet.Cells(R, 7).Value = UCase(TextBox3.Text)
R = 46
ActiveSheet.Cells(R, 9).Value = UCase(TextBox5.Text)


____________________________________________
R = 1
Sheet150.Cells(R, 1).Value = UCase(ComboBox1.Text)
Sheet150.Range("A1").Insert
R = 1
Sheet150.Cells(R, 1).Value = UCase(ComboBox2.Text)
___________________________________________


With Worksheets("dayoptions")
.Range("A1:A65536").Sort Key1:=.Range("A1")
End With

Unload Me
DAYOPTIONSDAYS.Show

End Sub

The code between the lines is where the problem is.

Thanks in advance
Greg


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
Marking Duplicates Daniell Excel Worksheet Functions 1 May 26th 05 10:53 PM
Help with Highlighting all duplicates in a row Jimv Excel Discussion (Misc queries) 4 April 21st 05 07:12 PM
Finding Duplicates nospaminlich Excel Worksheet Functions 4 February 5th 05 11:57 PM
Finding and Deleting duplicates in a column Brian Excel Worksheet Functions 3 February 5th 05 02:19 PM
Find duplicates R. Choate Excel Discussion (Misc queries) 5 November 28th 04 10:14 PM


All times are GMT +1. The time now is 02:44 AM.

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

About Us

"It's about Microsoft Excel"