LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Accessing VBProject Property

Help!

I have a very simple subroutine to get me a list of macros in the current
excel workbook. When the code runs I get a runtime error as follows:

VBProject <error: an exception of type:
{System.Runtime.InteropServices.COMException} occurred
Microsoft.Vbe.Interop.VBProject

The code is listed below.

Any ideas?

I am running the code under Visual Studio.

Peter

Sub ListModules()

Dim VBComp As Microsoft.Vbe.Interop.VBComponent

Dim Msg As String

Dim wb As Excel.Workbook

wb = m_ThisApplication.ActiveWorkbook

For Each VBComp In m_ThisApplication.ActiveWorkbook.VBProject.VBCompo nents

.........

Next VBComp

MsgBox(Msg)

End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error accessing external object property XVALUES sergio Excel Discussion (Misc queries) 2 February 7th 07 04:47 PM
Error accessing external object property vbe NilovSerge Excel Programming 1 June 21st 04 12:48 PM
Unprotecting the VBProject jstrater Excel Programming 4 May 16th 04 04:01 PM
Documentation for VBProject Wes Jester Excel Programming 2 September 30th 03 06:26 PM
VBProject events? Marc R. Bertrand Excel Programming 1 September 14th 03 04:12 PM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"