albatross32
New Member
- Joined
- Feb 17, 2010
- Messages
- 32
I am trying to write a VBA code for the Worksheet_Change function.
It is a Private Sub in Sheet1.
My Target Address is $O$9
I need the code to say;
If Target Address value = "AGREED" And Sheet2 Q233 = 1 Then.........
So far I have got to;
CODE:
However with this I am now getting 'Run-time error '13' Type mismatch'
Can someone advise me what changes are required or alternatively any different code which would work
It is a Private Sub in Sheet1.
My Target Address is $O$9
I need the code to say;
If Target Address value = "AGREED" And Sheet2 Q233 = 1 Then.........
So far I have got to;
CODE:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "$O$9" And UCase(Target.Value) = "PLACED" And Sheets("Sheet2").Range("Q233").Value = "1" Then
However with this I am now getting 'Run-time error '13' Type mismatch'
Can someone advise me what changes are required or alternatively any different code which would work