Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default How can I load a user form from within a worksheet subroutine?

I can load it from a module or from a forms routine, but not from a worksheet
routine. I want to be able to have it load when a command button (residing
on the worksheet) is clicked.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How can I load a user form from within a worksheet subroutine?

Doug,

Place this behind the command button on the sheet

Private Sub CommandButton1_Click()
Load UserForm1
End Sub

"Doug" wrote:

I can load it from a module or from a forms routine, but not from a worksheet
routine. I want to be able to have it load when a command button (residing
on the worksheet) is clicked.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default How can I load a user form from within a worksheet subroutine?

It didn't work. I keep getting a run-time error code, "1004": Application
defined error.

"JRForm" wrote:

Doug,

Place this behind the command button on the sheet

Private Sub CommandButton1_Click()
Load UserForm1
End Sub

"Doug" wrote:

I can load it from a module or from a forms routine, but not from a worksheet
routine. I want to be able to have it load when a command button (residing
on the worksheet) is clicked.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 460
Default How can I load a user form from within a worksheet subroutine?

JRForm,

I did get it to work. What I had to do was to include a call for a Load/Show
subroutine that I located in the Module. I can now Load/Show my UserForm.

Thank you all,
Doug

"JRForm" wrote:

Doug,

Place this behind the command button on the sheet

Private Sub CommandButton1_Click()
Load UserForm1
End Sub

"Doug" wrote:

I can load it from a module or from a forms routine, but not from a worksheet
routine. I want to be able to have it load when a command button (residing
on the worksheet) is clicked.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How can I load a user form from within a worksheet subroutine?

Doug,

The code I gave you should have worked if you placed it in the code module
for the button. However, I did assume you already had the UserForm1.
I am glad you have it working. :)

"Doug" wrote:

JRForm,

I did get it to work. What I had to do was to include a call for a Load/Show
subroutine that I located in the Module. I can now Load/Show my UserForm.

Thank you all,
Doug

"JRForm" wrote:

Doug,

Place this behind the command button on the sheet

Private Sub CommandButton1_Click()
Load UserForm1
End Sub

"Doug" wrote:

I can load it from a module or from a forms routine, but not from a worksheet
routine. I want to be able to have it load when a command button (residing
on the worksheet) is clicked.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Form - how to load it Balan Excel Discussion (Misc queries) 4 May 20th 08 12:39 PM
worksheet subroutine causes Compile error: Not found when on User Jim Brownson Excel Programming 3 August 9th 06 07:15 PM
how to load chart in user form Ahmed El Hadary Excel Programming 6 July 7th 05 02:25 PM
Conditional load of form when entering a certain worksheet davo64 Excel Programming 2 October 20th 04 01:11 PM
Userform doesn't recognize other user form upon re-load Cheryl Excel Programming 1 August 20th 04 10:43 PM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"