VBA Code showing runtime error '13'

arooney88

Board Regular
Joined
Feb 17, 2014
Messages
61
I was tasked with fixing this macro that isn't working but I don't know a lot about setting variables

Here is the code

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target = [BF2386] Then
If Target.Value = "Review Completed" Then
Mail_small_Text_Outlook
End If
End If
End Sub

BF2386 shows 'In Process' until someone manually changes it to "Review Completed"

I'm assuming the error that is showing relates to 'Target' but I'm not sure.

Any help would be great! Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi,
Try the following
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)


    Select Case Target.AddressLocal
        Case "$BF$2386"
            If Target.Value = "Review Completed" Then
                Mail_small_Text_Outlook
            End If
    End Select
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top