+ Reply to Thread
Results 1 to 6 of 6

Anyone know how to reference a vb project in vba

  1. #1
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Anyone know how to reference a vb project in vba

    Hello All,

    I am trying to learn how to reference the personal.xlsb and I don't see a way. I was thinking there were be some reference close to

    Please Login or Register  to view this content.
    Thanks
    M

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Anyone know how to reference a vb project in vba

    Have you tried using Workbooks("personal.xlsb").VBProject?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Anyone know how to reference a vb project in vba

    Norie,

    Thanks for the response

    I will try that. Not sure if it will work for my application, but I'll let you know!

  4. #4
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Anyone know how to reference a vb project in vba

    Norie,

    No luck. This creates a type error. My code is used to export all the modules from the personal.xlsb, but I am not sure how to reference it specifically.

    The full line of code is

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Anyone know how to reference a vb project in vba

    Why don't you have VBProject after Workbooks("personal.xlsb")?

    Without that Application.Workbooks("personal.xlsb") will return a reference to a workbook, hence the type mismatch.

  6. #6
    Registered User
    Join Date
    08-08-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Anyone know how to reference a vb project in vba

    Norie,

    Thanks! I don't think I have a good understanding of the container set up in vba. That worked perfect. I figured I would have to say .vbproject first.

    As usual you were a big help.

    Best,
    M

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Windows 8, Excel 2013 and Project 2010 - Reference Error in Macro
    By microsoftexcel007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2013, 06:23 PM
  2. Workbook VBA Project Reference will not migrate form Office 2010 to Office 2002
    By DAve Bradbury in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2013, 07:43 AM
  3. [SOLVED] Removing a reference from my project
    By paulary30 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-08-2013, 09:03 AM
  4. VBA Project Reference coping to other workbooks
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2010, 10:13 AM
  5. [SOLVED] reference vsto Excel ListObject in Vb.Net 2005 project/app
    By softengine in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-27-2005, 04:05 PM

Tags for this Thread

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