Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello !
I know how to open Excel from VB using Automation. I do not know how to open VB from Excel. Is it possible, for instance, to access a Form or a routine of aVB program ? Thank you for any advice. And a good day to you all. Pat. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
perhaps I have not understood you correctly.
But if the vb-toolbar is avalilable in spreadsheet you click <run macro icon you get all the macros or subs both in the hidden workbook and also in "this workbook" you click any macro or sub in the list and click <edit you go to that routine. if this is not what you want apologise PM wrote in message ... Hello ! I know how to open Excel from VB using Automation. I do not know how to open VB from Excel. Is it possible, for instance, to access a Form or a routine of aVB program ? Thank you for any advice. And a good day to you all. Pat. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Pm,
I know how to open Excel from VB using Automation. I do not know how to open VB from Excel. Is it possible, for instance, to access a Form or a routine of aVB program ? Thank you for any advice. And a good day to you all. Yes it is. Just put the VB code in an ActiveX dll and instantiate and use it from VBA: VB6 project MyProject, class CExposeForm with instancing set to MultiUse: Public Sub ShowForm() frmMyForm.Show End Sub VBA project with reference set to MyProject: Sub Test() Dim oVB6Class As MyProject.CExposeForm Set oVB6Class = New MyProject.CExposeForm oVB6Class.ShowForm End Sub Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah, this is even more precise than your previous answer.
Thanks a million (at least!). "Stephen Bullen" a écrit dans le message de news: ... Hi Pm, I know how to open Excel from VB using Automation. I do not know how to open VB from Excel. Is it possible, for instance, to access a Form or a routine of aVB program ? Thank you for any advice. And a good day to you all. Yes it is. Just put the VB code in an ActiveX dll and instantiate and use it from VBA: VB6 project MyProject, class CExposeForm with instancing set to MultiUse: Public Sub ShowForm() frmMyForm.Show End Sub VBA project with reference set to MyProject: Sub Test() Dim oVB6Class As MyProject.CExposeForm Set oVB6Class = New MyProject.CExposeForm oVB6Class.ShowForm End Sub Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Excel with automation | Excel Discussion (Misc queries) | |||
Excel automation in MFC | Excel Programming | |||
C# Excel Automation Add-In | Excel Programming | |||
Excel Com Automation | Excel Programming | |||
Vb.net - excel 97 automation | Excel Programming |