Re: Call VBA procedures from VB6 DLL



Hi

Thanks for your quickly reply!
Here is my test code for your reference.
[VBA Macro]
Sub MyTestMacro()
Dim oVB6 As New TestVBA.CallVBAObj
Dim oVBA As New MyVBAClass
oVB6.TestCallVBA oVBA
End Sub
[VBA Class]
Public Function Test() As String
Test = "Hello"
End Function


[VB6 Class]
Public Sub TestCallVBA(obj As Object)
MsgBox obj.Test
End Sub



Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Duplex Macro
    ... I've got a Word 2003 document that I'm trying to create a VBA macro ... Sub Document_Open ... MsgBox ("active printer is " & ActivePrinter) ... comprehensive than the Dummies series, ...
    (microsoft.public.word.vba.general)
  • Re: How to make Excel the active application
    ... ByVal lpCaption As String, ByVal wType As Long) As Long ... Sub DoItInFront() ... I start a VBA macro in Excel. ... When the VBA macro has finished it shows a MsgBox. ...
    (microsoft.public.excel.programming)
  • Excel and Outlook
    ... I had a VBA macro within Excel that used to work: ... would just email me the active workbook from Excel. ... Sub eMail_file ...
    (microsoft.public.excel.misc)
  • Re: Can I print a list of all of the worksheets within a workbook?
    ... You need a VBA macro to do this. ... Sub AAA ... Dim Ndx As Long ... Pearson Software Consulting, LLC ...
    (microsoft.public.excel.misc)
  • Excel Macro workbook_open() BUG with addins?
    ... I wrote a VBA macro do some calculations and I added a splash screen ... Private Sub workbook_open ... add-ins in excel "tool". ... but if I open any existingworkbook that contains data, ...
    (microsoft.public.excel.programming)