ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to Show a userform from XLA sub (https://www.excelbanter.com/excel-programming/284768-how-show-userform-xla-sub.html)

Thibault

How to Show a userform from XLA sub
 

Hi everybody,

I'm trying to show a userform from an XLA addin. The userform is
defined within a regular XLS project.

I have tried:
Userform1.show
VBA.UserForms.Add("userform1").Show

But I get 424 error

Of course Userform1.show works when called from a Sub in the XLS
project where the userform is defined.

Thanks for any Idea.

Regards.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements

Chip Pearson

How to Show a userform from XLA sub
 
Create a procedure in the XLA called ShowTheForm and then call
that procedure from the XLS file.

[in the XLA]
Public Sub ShowTheForm()
Userform1.Show
End Sub

[in the XLS]
Application.Run Filename.xla!ShowTheForm


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Thibault" wrote in
message ...

Hi everybody,

I'm trying to show a userform from an XLA addin. The userform

is
defined within a regular XLS project.

I have tried:
Userform1.show
VBA.UserForms.Add("userform1").Show

But I get 424 error

Of course Userform1.show works when called from a Sub in the

XLS
project where the userform is defined.

Thanks for any Idea.

Regards.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide

to creating financial statements




All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com