Forum Discussion

Tamara Tiggs's avatar
Tamara Tiggs
Copper Contributor
Apr 28, 2018

VBA Command Button

Hello

I am new to VBA and I followed a youtube video to create a reset command button for my order form. I doubled checked the spaces and all but the button is not working. When I unclick Design Mode and try to select the button it takes me straight back to the code. So something is wrong there. The "Private Sub CommandButton1_Click()" is dark red colored which tells me something is wrong with that section? I am pretty for sure its a dumb newbie error.

 

Newbie so any help would be appreciated. 

  • Hi Tamara,

     

    The dark red color is called a Breakpoint.

    It's used to stop the execution at a specific line of code for debugging purposes.

    To clear that breakpoint, place the cursor on the colored line, then press F9.

    Or you can click the red point on the left margin.

     

    Hope that helps

    Haytham

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Tamara,

     

    The dark red color is called a Breakpoint.

    It's used to stop the execution at a specific line of code for debugging purposes.

    To clear that breakpoint, place the cursor on the colored line, then press F9.

    Or you can click the red point on the left margin.

     

    Hope that helps

    Haytham