Results 1 to 2 of 2

Thread: Call a Private Sub from another userform

  1. #1
    All AUGI, all the time
    Join Date
    2003-10
    Posts
    706
    Login to Give a bone
    0

    Default Call a Private Sub from another userform

    How can I use a user defined Private sub from another userform? I want to be able to click on a button from one userform and have it go to another userform's private sub to calculate something for me and then return to the original userform. I'm sure this is very easy. Do you do this in a module?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,409
    Login to Give a bone
    0

    Default Re: Call a Private Sub from another userform

    As long as you've got it declared as private, the form would have to initiate the call. Either make the procedure public or create another public sub that can call it. Whether the calling code is in a regular module or another form's class module makes no difference as to the scope of the source procedure.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Parameters from Userform
    By CADfunk MC in forum VBA/COM Interop
    Replies: 2
    Last Post: 2010-04-26, 06:25 PM
  2. All I want is a Userform to show..
    By Coolmo in forum Dot Net API
    Replies: 5
    Last Post: 2009-07-23, 02:03 PM
  3. VBA userform in excel
    By Streng in forum VBA/COM Interop
    Replies: 3
    Last Post: 2009-02-17, 07:02 PM
  4. Userform sizing
    By Coolmo in forum VBA/COM Interop
    Replies: 7
    Last Post: 2006-05-30, 11:30 PM

Posting Permissions

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