Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PM PM is offline
external usenet poster
 
Posts: 16
Default Automation : from Excel to VB ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Automation : from Excel to VB ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Automation : from Excel to VB ?

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
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
Using Excel with automation Thomas Bodell Excel Discussion (Misc queries) 5 May 8th 09 03:09 PM
Excel automation in MFC charian Excel Programming 0 July 20th 04 03:45 AM
C# Excel Automation Add-In Frank X Excel Programming 4 February 23rd 04 01:30 PM
Excel Com Automation Tom Ogilvy Excel Programming 5 November 10th 03 02:05 PM
Vb.net - excel 97 automation michael Excel Programming 0 August 14th 03 06:16 PM


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

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

About Us

"It's about Microsoft Excel"