Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default How to click the button from module?

Thank you

"Harald Staff" wrote:

Sub Demo()
Call UserForm1.CommandButton1_Click
End Sub


HTH. Best wishes Harald

"OKLover" skrev i melding
...
What if the commandbutton is on the userform? how to call it?

"Tom Ogilvy" wrote:

If you make it public instead of private

Public Sub CommandButton1_Click()

end Sub

then in another module you can do

Sheet1!CommandButton1_Click

Where sheet1 is the code name of the sheet containing the code.
--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
Hi, all

Does it possible to click the commandbutton(or activate the
commandbutton_click event) on the userform from the global module?






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
Assigning a module to a button macro DMB Excel Discussion (Misc queries) 2 January 19th 06 12:37 AM
command button for vba module delmac Excel Programming 1 June 23rd 05 06:04 PM
On Button Click(Help!) jpizzle[_2_] Excel Programming 1 June 3rd 05 11:32 AM
Adding module - assigning macro to button a Excel Programming 1 September 2nd 04 01:55 AM
Attaching a macro (module) code to button Todd Huttenstine[_2_] Excel Programming 1 December 29th 03 09:12 AM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"