LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Using Userform object in Excel via automation from VB 6

Hi Howard,

It has to be a Userform that is run via Automation.


Just curious, but why? It's not something I've ever come across
before.

Is there a way to reference the created Userform directly?
I 've not found a way to do that.


The 'Inside' of the userform - i.e. everything in the 'client' part of
the window can be accessed via the VBComponent's Designer property,
which returns an object of type UserForm, for you to access all the
controls on the form, etc.

The 'Outside' of the userform - i.e. the size, caption etc can only (to
my knowledge) be controlled using the VBComponent's Properties
collection.

The .Show still does not work.


In the same way the we can't show a form in one project from code in a
different project, I don't think we can directly show a VBA userform
using automation. The best we can do is to add a standard module, add
code to it to display the form, then use Application.Run to call it, as
you've done.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk

 
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
Ole automation with Excel 10 from Vb.net Richie Weldon \(MSFT\) Excel Programming 0 November 13th 03 06:08 PM
unable to create embedded object on a userform Robert Nobles Excel Programming 0 September 9th 03 08:49 PM
Automation Error: The Object Invoked Has Disconnected from Its Clients (Excel) Vaibhav Excel Programming 0 September 8th 03 04:57 PM
Automation Error: The Object Invoked Has Disconnected from Its Clients Vaibhav Dandavate Excel Programming 0 September 8th 03 04:05 PM


All times are GMT +1. The time now is 10:38 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"