Results 1 to 5 of 5

Thread: Calling a Sub

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Calling a Sub

    I'm trying to call a Sub that is located in a module, from a click event in my form. When I debug the app, it just goes through the code, but never goes to the procedure...any suggestions?


    in form...gets executed on button click event
    VB Code:
    1. Module.edit_check(txtItem.Text, txtActivity.Text, txtJob.Text)

    in module
    VB Code:
    1. Public Sub edit_check(ByVal b As String, ByVal c As String, ByVal d As String)

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Weird !
    Save your proj , close the IDE , run it again and see what happens?

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I think the word Module is a keyword and can't be used. Change your module to a different name and try it.

  4. #4
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872
    indeed, the word module may notbe used al a name of a module, you'd better call it Module1 or something similar. Then It should work
    - Use the thread tools to Mark your Thread as Resolved when your question is answered.
    - Please Rate my answers if they where helpful.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You can use your sub directly without referring to the module name if it's publicly declared .

Posting Permissions

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



Click Here to Expand Forum to Full Width