Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
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
ALL EXPERTS ........... WHERE ARE YOU ?? YESHWANT Excel Discussion (Misc queries) 5 August 29th 09 07:47 PM
for the experts Herman Excel Discussion (Misc queries) 2 October 28th 05 11:59 PM
again for the experts Herman Excel Discussion (Misc queries) 0 October 28th 05 04:13 PM
Help - Need experts help! rvnwdr Excel Discussion (Misc queries) 7 June 22nd 05 02:12 PM
another for the experts Wazooli Excel Discussion (Misc queries) 3 March 26th 05 07:21 AM


All times are GMT +1. The time now is 08:53 AM.

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

About Us

"It's about Microsoft Excel"