Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB tutorial on debug & test a project (VB6)

    Hello

    Im familiar with VBA programming.

    Ive been asked to amend a VB project. I'm fine with writing the code and thats done. I have added the new code to one module in the project.

    I would just like to test it and step thru it - and thats the part I dont know.
    its a project with several components ie forms and modules.

    I managed to work out the following:
    1. Open up VB
    2. File>Open existing Project
    its opened up the project.
    and I've compiled it and its fined.

    I j ust need to step and run thru it and I dont know how to yet? [img]/forums/images/smilies/ohmy.gif[/img])

    any pointers in the right direction would be greatly appreciated.

    many thanks
    diana :-)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VB tutorial on debug & test a project (VB6)

    Click in the line where you want to start testing, e.g. a line such as Sub MyProc() or Private Sub cmdOK_Click()
    Press F9 to set a breakpoint.
    Run the project.
    Activate the code you want to test (for example by clicking a command button).
    The code will pause at the line where you set a breakpoint.
    You can now use F8 to single-step through the code.
    If you want to execute a called procedure in one step, press Shift+F8 instead of F8.
    If you want to continue automatic execution, press F5.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB tutorial on debug & test a project (VB6)

    thank you Hans.

    Each time I run it, it just stops. I've looked in all the modules and I cant locate the main module that calls all the other modules, so if I can find that should be OK.

    As a workaround I create the .DLL, and then run thru the code & observe the end result.
    Its not the best or safest way, b ut thats the only way I can get it running for now [img]/forums/images/smilies/ohmy.gif[/img])

    many thanks Hans
    diana

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VB tutorial on debug & test a project (VB6)

    Select Project | Project Properties, activate the General tab and look for the Startup Object setting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •