Results 1 to 8 of 8

Show macro code

Threaded View

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Show macro code

    Hello everybody
    I have the following code that let me navigate to specific module:

    Sub ShowMacroCode()
    
      Dim ModName As String
      Dim ProcName As String
      Dim VBProj As Object
      
        ModName = "Mod_Test"
        ProcName = "TestC"
        Set VBProj = Application.VBE.ActiveVBProject
        
        With VBProj.VBComponents(ModName).CodeModule
          .CodePane.TopLine = .ProcStartLine(ProcName, vbext_pk_Proc)
          .CodePane.Show
        End With
        
    End Sub
    It works well .. but I want the code to go directly to the specified procedure ...which is here (TestC)
    The code navigates to the specific module but not to the specific procedure
    Here's an attachment
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro code to show only the rows with specific cell text in a particular column
    By Itachi1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 01:33 PM
  2. Code to show date as hh:mm when saving via macro
    By Greed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2011, 03:04 PM
  3. VBA CODE to Show Date After Running Macro
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2009, 12:36 PM
  4. macro code to show userform
    By stevesunfold in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-15-2008, 01:47 PM
  5. Macro code to show a graph (in sheet2)
    By cenee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2006, 09:18 PM

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