ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   call a userform (https://www.excelbanter.com/excel-programming/371828-call-userform.html)

Janis

call a userform
 
In the project code module I want to call a userform. ProcessChoices is the
name of the form. SSPproject is the name of the Project.
I tried:

Public Sub ProcessChoices()
SSPproject.ProcessChoices Load
End Sub

It doesn't work, how do you load a form?
thanks,

Jim Thomlinson

call a userform
 
Are you trying to open a form in a spreadsheet (or addin) from another
spreadsheet or addin? If so then you need to either create a reference to the
project where the form is in the spreadsheet that is trying to load the form.
Tools - References -SSPproject.
Call SSPproject.LoadProcessChoices
Or you can use
Application.Run("SSPproject.LoadProcessChoices")

In either cases in the SSPproject you need to add a procedure to load the
form. The procedure needs to reside in a regular code module.

Public Sub LoadProcessChoices()
ProcessChoices.Show
end sub

--
HTH...

Jim Thomlinson


"Janis" wrote:

In the project code module I want to call a userform. ProcessChoices is the
name of the form. SSPproject is the name of the Project.
I tried:

Public Sub ProcessChoices()
SSPproject.ProcessChoices Load
End Sub

It doesn't work, how do you load a form?
thanks,


Janis

call a userform
 
Never mind, I figured it out. It has been one of those days.

"Janis" wrote:

In the project code module I want to call a userform. ProcessChoices is the
name of the form. SSPproject is the name of the Project.
I tried:

Public Sub ProcessChoices()
SSPproject.ProcessChoices Load
End Sub

It doesn't work, how do you load a form?
thanks,


Janis

call a userform
 
This is weird. What I did works except you can't close Excel afterward. You
have to force quit. Thanks I'll try your idea.

"Jim Thomlinson" wrote:

Are you trying to open a form in a spreadsheet (or addin) from another
spreadsheet or addin? If so then you need to either create a reference to the
project where the form is in the spreadsheet that is trying to load the form.
Tools - References -SSPproject.
Call SSPproject.LoadProcessChoices
Or you can use
Application.Run("SSPproject.LoadProcessChoices")

In either cases in the SSPproject you need to add a procedure to load the
form. The procedure needs to reside in a regular code module.

Public Sub LoadProcessChoices()
ProcessChoices.Show
end sub

--
HTH...

Jim Thomlinson


"Janis" wrote:

In the project code module I want to call a userform. ProcessChoices is the
name of the form. SSPproject is the name of the Project.
I tried:

Public Sub ProcessChoices()
SSPproject.ProcessChoices Load
End Sub

It doesn't work, how do you load a form?
thanks,



All times are GMT +1. The time now is 02:49 PM.

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