Results 1 to 9 of 9

Getting error while executing VBA Code

Threaded View

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Getting error while executing VBA Code

    Hi I am getting error while executing below code :-> Compile error : User-defined type not defined
    Sub Test()
    
    Dim pUID As New UID
    Dim pCommand As ICommandItem
    pUID.Value = "myLibrary.myClass"
    Set pCommand = m_papp.Document.CommandBars.Find(pUID)
    pPcommand.Execute
    
    End Sub
    Can any tell me is it possible to create PUID as UID instance and pCommand as ICommandItem.

    In excel VBA its giving me error.
    Last edited by JosephP; 11-09-2012 at 03:20 AM.

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