ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   error with userform, "unable to create embedded object" (https://www.excelbanter.com/excel-programming/344314-error-userform-unable-create-embedded-object.html)

Jeff

error with userform, "unable to create embedded object"
 
I have created a very simple userform. It contains only a label control.

It will not work.

When I try to execute I get the error:

Run-time error '31032':
Unable to create embedded object

The code calling the form is:

Private Sub CommandButton1_Click()
UserForm3.Show
End Sub

CommandButtun1 is on sheet 1 of my workbook.

This is my first attempt at userforms. Is there something basic that I'm
missing? I 've read books and web sites and help files and have been unable
to solve this problem

Leith Ross[_178_]

error with userform, "unable to create embedded object"
 

Hello Jeff,

2 Questions. How did you create the CommandButton and Is the Sub code
for CommandButton1 part of UserForm3 or the Worksheet?

Thanks,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=480755


Jeff

error with userform, "unable to create embedded object"
 
Hi Leith,

thanks for your response!

2 Questions. How did you create the CommandButton and Is the Sub code
for CommandButton1 part of UserForm3 or the Worksheet?


The command button was created on sheet1 of my workbook using the control
toolbox toolbar.

The sub code was created by right clicking the command button (while in
design mode) in the worksheet and then clicking view code on the popup menu.
In the VB editor the sub code appears in a window that says sheet1. I
figure this means it is part of sheet1 and not part of UserForm3. I can
execute other code in the sub and it will work (such as MsgBox prompt:="test
message commandbutton1"). It only gives the error when it gets to the
UserForm3.Show statement.

Jeff
Jeff



xcskier

error with userform, "unable to create embedded object"
 

posted this using the microsoft site... posting here manually to speed
up the process...


Hi Leith,

thanks for your response!

> 2 Questions. How did you create the CommandButton and Is the Sub
code
> for CommandButton1 part of UserForm3 or the Worksheet?

The command button was created on sheet1 of my workbook using the
control
toolbox toolbar.

The sub code was created by right clicking the command button (while
in
design mode) in the worksheet and then clicking view code on the popup
menu.
In the VB editor the sub code appears in a window that says sheet1. I
figure this means it is part of sheet1 and not part of UserForm3. I
can
execute other code in the sub and it will work (such as MsgBox
prompt:="test
message commandbutton1"). It only gives the error when it gets to
the
UserForm3.Show statement.

Jeff
Jeff


--
xcskier


------------------------------------------------------------------------
xcskier's Profile: http://www.excelforum.com/member.php...o&userid=28480
View this thread: http://www.excelforum.com/showthread...hreadid=480755


xcskier[_2_]

error with userform, "unable to create embedded object"
 

Decided to try reinstalling Office 97.

First attempt (just added stuff that was not previously installed) did
not help.

On second attempt I first removed Office 97 and then reinstalled it.

This seems to have fixed the problem.

note: On the reinstall I chose to install everything.

Perhaps some file was corrupted...


--
xcskier


------------------------------------------------------------------------
xcskier's Profile: http://www.excelforum.com/member.php...o&userid=28480
View this thread: http://www.excelforum.com/showthread...hreadid=480755



All times are GMT +1. The time now is 04:37 AM.

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