Debugging or program issue?

erutherford

Active Member
Joined
Dec 19, 2016
Messages
390
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
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
10,140
Try:
Code:
If Intersect(Target,Range("A1:A10")) Is Nothing Then
The period should be a comma.
 

erutherford

Active Member
Joined
Dec 19, 2016
Messages
390
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
 

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
10,140
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,893
Messages
5,598,712
Members
414,254
Latest member
MarieCo

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
Top