Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Only for experts - please help
Actually I have an reporting "system" based solely in Excel, implemented
through an Workbook_Open, a Sub ProcessReport, custom controls in a worksheet and so on. I pretend migrate the custom controls to a VB6 (front loader), specifically a VB6 dll (see chapter 20 of "Professional Excel Development", of Bullen, Bovey & Green). Ok, suppose i have the form communicating "two-ways" with the ExcelApp, my question is, how to call the macro ProcessReport from the cmdProcess_click in the form of the VB6 dll? Thanks in advance, Miguel Castanuela |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Only for experts - please help
I have it like this:
In the VB6 app module: Public oXLApp As Object In the VB6 class module I have this code fragment, which shows what is going on: Option Explicit Private Const GWL_HWNDPARENT As Long = -8 Private Declare Function FindWindow _ Lib "user32" _ Alias "FindWindowA" _ (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Private Declare Function SetWindowLong _ Lib "user32" _ Alias "SetWindowLongA" _ (ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Public Sub ShowVB6Form(oXL As Object, _ Optional strReadCode As String, _ Optional strTermText As String) Dim lHwnd As Long Set frmRCB = New frmRCBrowser Set oXLApp = oXL lHwnd = FindWindow("XLMAIN", oXLApp.Caption) With frmRCB Load frmRCB SetWindowLong .hWnd, GWL_HWNDPARENT, lHwnd .Show 0 If Len(strReadCode) 0 Then .optButton(2).Value = True .txtBox(1).Text = strReadCode bSearchButton = False oXLApp.Run "ReadCodeBrowser.xla!Module1.DoSearch" etc. RBS "Miguel Castanuela" wrote in message ... Actually I have an reporting "system" based solely in Excel, implemented through an Workbook_Open, a Sub ProcessReport, custom controls in a worksheet and so on. I pretend migrate the custom controls to a VB6 (front loader), specifically a VB6 dll (see chapter 20 of "Professional Excel Development", of Bullen, Bovey & Green). Ok, suppose i have the form communicating "two-ways" with the ExcelApp, my question is, how to call the macro ProcessReport from the cmdProcess_click in the form of the VB6 dll? Thanks in advance, Miguel Castanuela |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Only for experts - please help
Miguel,
How are communicating between the DLL and Excel ? What about : Dim With Events MyObject As clsCustomDLL and raise an event from the DLL NickHK "Miguel Castanuela" wrote in message ... Actually I have an reporting "system" based solely in Excel, implemented through an Workbook_Open, a Sub ProcessReport, custom controls in a worksheet and so on. I pretend migrate the custom controls to a VB6 (front loader), specifically a VB6 dll (see chapter 20 of "Professional Excel Development", of Bullen, Bovey & Green). Ok, suppose i have the form communicating "two-ways" with the ExcelApp, my question is, how to call the macro ProcessReport from the cmdProcess_click in the form of the VB6 dll? Thanks in advance, Miguel Castanuela |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ALL EXPERTS ........... WHERE ARE YOU ?? | Excel Discussion (Misc queries) | |||
for the experts | Excel Discussion (Misc queries) | |||
again for the experts | Excel Discussion (Misc queries) | |||
Help - Need experts help! | Excel Discussion (Misc queries) | |||
another for the experts | Excel Discussion (Misc queries) |