Results 1 to 2 of 2

Thread: Crazy problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Location
    Bangalore
    Posts
    25

    Thumbs down Crazy problem

    I have this problem :

    I need to get the code window of a particular class.

    Say, ProjectName is "Project1" and
    ComponentName is "Form1"

    I have this code :

    Public VBInstance as VBIDE.VBE

    Dim objVBComponent AS VBComponent

    sProjectName = "Project1"
    sComponentName = "Form1"

    'Error occurs at the following line
    Set objVBComponent = VBInstance.VBProjects.Item _
    (sProjectName).VBComponents.Item (sComponentName)
    objVBComponent.CodeModule.CodePane.Show

    When I run this code "Object or with Variable not set" error is popping up. I have added Microsoft VB Extensibility 6.0 Library.

    How could I solve this problem?

    Samarth



    samarthk

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    Isn't that code for an addin though?

Posting Permissions

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



Click Here to Expand Forum to Full Width