Hoopsah
12-11-2007, 07:15 AM
Hi,
I looked at a couple of the other threads on here, but to be honest :dunno
I have a list, that the user inputs to, and I want excel to check that the name doesn't get input if it already exists.
Can someone have a look at the coding below and let me know where to insert a check and how to insert a check.
Heres my code:
Sub Add_New_Designer_Data()
'
' Add_New_Designer_Data Macro
' Macro recorded 02/11/2007 by Gerry McNally
'
'
Application.ScreenUpdating = False
Sheets("Designer_ID").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Add New Designer").Select
Range("E16").Select
Selection.Copy
Sheets("Designer_ID").Select
Range("A216").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Add New Designer").Select
ActiveCell.FormulaR1C1 = ""
Application.ScreenUpdating = True
Range("E16").Select
MsgBox ("New Designer Added")
End Sub
I looked at a couple of the other threads on here, but to be honest :dunno
I have a list, that the user inputs to, and I want excel to check that the name doesn't get input if it already exists.
Can someone have a look at the coding below and let me know where to insert a check and how to insert a check.
Heres my code:
Sub Add_New_Designer_Data()
'
' Add_New_Designer_Data Macro
' Macro recorded 02/11/2007 by Gerry McNally
'
'
Application.ScreenUpdating = False
Sheets("Designer_ID").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Add New Designer").Select
Range("E16").Select
Selection.Copy
Sheets("Designer_ID").Select
Range("A216").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Add New Designer").Select
ActiveCell.FormulaR1C1 = ""
Application.ScreenUpdating = True
Range("E16").Select
MsgBox ("New Designer Added")
End Sub