By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,578 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,578 IT Pros & Developers. It's quick & easy.

Using .NET dll in vbscript

P: n/a
I created a .NET library using the VS 2003 COM template. I can do a
CreatObject() from vbscript, but none of the properties are visible. What is

Here is the code:

<ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _
Public Class ComClass1

#Region "COM GUIDs"
' These GUIDs provide the COM identity for this class
' and its COM interfaces. If you change them, existing
' clients will no longer be able to access the class.
Public Const ClassId As String = "570CB39C-0685-468A-ABDE-0E3AD0A9A666"
Public Const InterfaceId As String =
Public Const EventsId As String = "B1D20E70-59D6-4D1C-B566-7F227F0119D1"
#End Region

' A creatable COM class must have a Public Sub New()
' with no parameters, otherwise, the class will not be
' registered in the COM registry and cannot be created
' via CreateObject.

Public Sub New()
End Sub
Private csError As String ' stores the error message
Public ReadOnly Property ErrorMsg() As String
Return csError
End Get
End Property
Public Function Concat(ByVal str1 As String, ByVal str2 As String) As
Return Concat = str1 & " " & str2
End Function
End Class
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I have had a similar problem where you don't get the properties in the
dropdown listing from your .net dll if you are using it in an Access
code module. You won't get any dropdowns in VBscript. But if I create
the same dll in a VB6 activeX dll, then I get the properties. I believe
the problem is that there is no interface between .Net coding and com
coding. An activeX dll is a com dll. A .Net dll is not a com dll
therefore, you don't get the dropdowns. You just have to know the
properties that are there in your dll. At least, that has been my
experience, and I have posted on this with no results.


*** Sent via Developersdex ***
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.