Development vb help

Discussion in 'Software' started by ahug4122, 1 Dec 2004.

  1. ahug4122

    ahug4122 What's a Dremel?

    Joined:
    16 Sep 2004
    Posts:
    60
    Likes Received:
    0
    hey guys (girls)

    i need to know how to use a fing

    i want learn how to use a .bas file like have parts of my code in there and what do i type to use the in the form say cmd1_click
     
  2. djengiz

    djengiz Pointless.

    Joined:
    16 Aug 2002
    Posts:
    1,129
    Likes Received:
    0
  3. Hepath

    Hepath Minimodder

    Joined:
    20 Oct 2003
    Posts:
    730
    Likes Received:
    0
    .bas modules [generally] contain functions that are available to the whole application.

    .frm modules are the files in which the code for your Forms appear. All the window click events and the like generally go in here by default.
     
  4. ahug4122

    ahug4122 What's a Dremel?

    Joined:
    16 Sep 2004
    Posts:
    60
    Likes Received:
    0
    yea i know that but how do i run one of the .bas file in a form eg if i click a button i want it to run the .bas file
     
  5. djengiz

    djengiz Pointless.

    Joined:
    16 Aug 2002
    Posts:
    1,129
    Likes Received:
    0
    Define a sub or function in a .bas file.

    Copy following into bas file:

    Public sub s()
    msgbox "hello"
    end sub

    in the cmd1_click:

    call s

    see what happens
     
  6. mcbeckel

    mcbeckel What's a Dremel?

    Joined:
    31 Aug 2003
    Posts:
    76
    Likes Received:
    0
    The key is to decalre the sub or function as "Public" then calling that sub/function from another form or module will be no problem.
     
  7. ahug4122

    ahug4122 What's a Dremel?

    Joined:
    16 Sep 2004
    Posts:
    60
    Likes Received:
    0
    thank you guys so much that just solved my problem now only one more and thats in electronics unless any of you can help
     

Share This Page