Results 1 to 10 of 10

How to run a separate private procedure within the same module

Threaded View

  1. #10
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How to run a separate private procedure within the same module

    clemsoncooz,
    private/public defines the scope of the sub. It's not only about user being able to run it with ALT+F8, but also from where you can run the sub in VBA.
    Look at the attached file. in Module 1 you have a private sub. in module 2 there are two subs that try to run the private sub from Module1. One is using call and the other application.run
    Actually the project does not even compile because call method does not "see" the private sub in the other module. However the application.run does the job. try to run each of the two with F5/F8 to see the difference.

    buran
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1