View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Steven Cheng Steven Cheng is offline
external usenet poster
 
Posts: 28
Default Loading Userform

Thanks for responding Brian. However, I changed the button name but it sill
came up with the same error message.

Is there something else that I am missing?

"Steven Cheng" wrote:

I am having some challenges on getting a command button to load and show a
user form

this is the code for the command button on each of the worksheets to load
and show the userform:

Private Sub CommandButton1_Click()
LoadForm
End Sub

this is the code for LoadForm which is located in a module.

Sub LoadForm()
Load UserForm1
UserForm1.Show
End Sub

I can't see why that I am getting an error message that indicates the
application-defined or object defined error.