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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

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