ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Showing a userform (https://www.excelbanter.com/excel-programming/347249-showing-userform.html)

Kent McPherson

Showing a userform
 
I have a userform defined. I have a bottom which makes the userform visible.
According to the book "Excel VBA Macro Programming" I should be able to make
it visible with this statement:

userform1.Show

But that didn't work. I had to change the statement to:

VBA.UserForms.Add("userform1").Show

Is that expected?



K Dales[_2_]

Showing a userform
 
No, definitely not expected. Check your references: is the Microsoft Forms
Object Model checked? A userform is from MSForms, so I suspect the reason it
is not recognizing the UserForm as an object is that there is something wrong
with the MSForms library reference.
--
- K Dales


"Kent McPherson" wrote:

I have a userform defined. I have a bottom which makes the userform visible.
According to the book "Excel VBA Macro Programming" I should be able to make
it visible with this statement:

userform1.Show

But that didn't work. I had to change the statement to:

VBA.UserForms.Add("userform1").Show

Is that expected?





All times are GMT +1. The time now is 01:39 AM.

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