Consulting

Results 1 to 8 of 8

Thread: Solved: Newbie once again, importing a module

  1. #1
    VBAX Regular
    Joined
    Apr 2008
    Posts
    97
    Location

    Solved: Newbie once again, importing a module

    I know I am referencing this the wrong way or something, it couldn't be as simple as the statement below. What am I missing?
    Thanks again Excel gods

    ActiveWorkbook.VBProject.VBComponents.Import ("c:\bdr\GOOJFC.bas")

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    It is that simple but you have to have Programmatic access to the VBProject trusted under Tools-Macro-Security, on the Trusted Sources tab.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    VBAX Regular
    Joined
    Apr 2008
    Posts
    97
    Location
    How would I get the code to work on my field reps laptops? Would I have to add it to each users trusted sources? Is there a way around it?

    Oops, never mind, I can't even add myself because of our desktop standardization. AARG.

  4. #4
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    Depends on how tight the security is. You can override it through code:
    [VBA]'Code removed by administrator.
    [/VBA]
    if they have access to the registry.
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    The thread was considered to be moving in a direction which is contravening a major policy of this forum. By utilizing code which enables a person to adjust the settings within the Trusted Sources component of a system, simply breaks down the security of a system.

    Please be advised that this will not be condoned by the Administrators of this forum. Unless this thread moves in another direction, it will be closed.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    Apologies (again) - I wasn't really thinking when I posted that!
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    That's okay Rory.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  8. #8
    VBAX Regular
    Joined
    Apr 2008
    Posts
    97
    Location
    Also sorry, wasn't my intention. With my limited knowledge of VBA I would be venturing into some very questionable ground anyway. Could have been a classic "CLM"
    career limiting move.
    Thanks......

Posting Permissions

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