Debugging or program issue?

erutherford

Active Member
Joined
Dec 19, 2016
Messages
453
My debugging features don't appear to be working.

Wrote some simple code just to work with.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target.Range("A1:A10")) Is Nothing Then

MsgBox "Nothing in here"

Else

MsgBox "something here"

End If

End Sub

Now the code gives a "argument not optional" error and the debug choices do not work!

any ideas?
2013 version
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try:
Code:
If Intersect(Target,Range("A1:A10")) Is Nothing Then
The period should be a comma.
 
Upvote 0
Oops. Code functions. When you put in a breakpoint, the code will run to the breakpoint and stop. Then you have to reset the code if you change the breakpoint?

What is required to run the "step into"?

Thanks mumps
 
Upvote 0
Maybe you could play with a couple of other things. Have you tried pressing the F8 key? This will step through the macro one line at a time. Also, when you do this or put in a break point, you should see a yellow arrow in the left margin with the row highlighted in yellow. You can click and drag the yellow arrow up or down to a different line of code and continue stepping through using the F8 key or run the code to the next break point.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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