Hi All!
I'm putting a spreadsheet together which will keep a track of potential suppliers I am using and who has quoted and regretted. I am currently using a simple entry method where I can change each on individually
eg cell C2 contains - supplier1, supplier2, supplier3
when I get a response the font colour is changed, ie if supplier1 regrets, the become supplier1, if supplier2 offers they become supplier2.
The result is a simple log of who as offered, who has regretted and who is outstanding. Works Well.
I'm now trying to put another system together which the entries are entered from a drop down using a code to allow multiple entries.....no issue.
The problem is this will not allow the changing of colours of individual entries as previous and above.
Code is below for multiple entries
Code/
Dim Oldvalue As String
Dim Newvalue As String
On Error GoTo Exitsub
If Target.Address = "$C$2" Then
If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
GoTo Exitsub
Else: If Target.Value = "" Then GoTo Exitsub Else
Application.EnableEvents = False
Newvalue = Target.Value
Application.Undo
Oldvalue = Target.Value
If Oldvalue = "" Then
Target.Value = Newvalue
Else
Target.Value = Oldvalue & ", " & Newvalue
End If
End If
End If
Application.EnableEvents = True
Exitsub:
Application.EnableEvents = True
End Sub
\code
Is it possible? Would like to keep the same format is possible.
Thanks for any help offered.
I'm putting a spreadsheet together which will keep a track of potential suppliers I am using and who has quoted and regretted. I am currently using a simple entry method where I can change each on individually
eg cell C2 contains - supplier1, supplier2, supplier3
when I get a response the font colour is changed, ie if supplier1 regrets, the become supplier1, if supplier2 offers they become supplier2.
The result is a simple log of who as offered, who has regretted and who is outstanding. Works Well.
I'm now trying to put another system together which the entries are entered from a drop down using a code to allow multiple entries.....no issue.
The problem is this will not allow the changing of colours of individual entries as previous and above.
Code is below for multiple entries
Code/
Dim Oldvalue As String
Dim Newvalue As String
On Error GoTo Exitsub
If Target.Address = "$C$2" Then
If Target.SpecialCells(xlCellTypeAllValidation) Is Nothing Then
GoTo Exitsub
Else: If Target.Value = "" Then GoTo Exitsub Else
Application.EnableEvents = False
Newvalue = Target.Value
Application.Undo
Oldvalue = Target.Value
If Oldvalue = "" Then
Target.Value = Newvalue
Else
Target.Value = Oldvalue & ", " & Newvalue
End If
End If
End If
Application.EnableEvents = True
Exitsub:
Application.EnableEvents = True
End Sub
\code
Is it possible? Would like to keep the same format is possible.
Thanks for any help offered.