Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Importing a Module.bas using VB

  1. #1
    New Member
    Join Date
    Feb 2002
    Location
    Benicia, CA
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    What would be the code to Import a module.bas using VB code. I keep trying to use the SendKeys function but once the import file box comes up it does not type anything, so i was hoping someone had an easier way to import a module by just using one line of code. Any help would be greatly appreciated. Thanks

    Greg

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-11 23:01, greg0226 wrote:
    What would be the code to Import a module.bas using VB code. I keep trying to use the SendKeys function but once the import file box comes up it does not type anything, so i was hoping someone had an easier way to import a module by just using one line of code. Any help would be greatly appreciated. Thanks

    Greg
    ActiveWorkbook.VBProject.VBComponents.Import "Full path name to Bas file"

    You'll need to reference the Micorsoft Visual basics extensibilty file.


    Ivan

  3. #3
    New Member
    Join Date
    Feb 2002
    Location
    Benicia, CA
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    what do you mean by reference the VB extensibility file?

  4. #4
    New Member
    Join Date
    Feb 2002
    Location
    Benicia, CA
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thanks, i got it working.. appreciate the help.

    Greg

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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