LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default Running code from userform

What do you mean by open?

If you mean load it into memory, then nope. You have to do that.

If you mean display it to the user, then you can run the code without doing that.

I create a small userform with a single commandbutton on it.

This was the code that was behind that userform:

Option Explicit
Private Sub CommandButton1_Click()
MsgBox "hi"
End Sub


Then I created a subroutine in a general module that looked like:

Option Explicit
Sub testme()
Load UserForm1
UserForm1.CommandButton1.Value = True
Unload UserForm1
End Sub




ordnance1 wrote:

Is it possible to run the code assigned to commandbutton1 on userform1
without opening the userform?


--

Dave Peterson
 
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
flash movie on userform doesn't play when code is running macroapa Excel Programming 0 August 7th 09 07:24 PM
UserForm Shown while Program is Running other Code ironhydroxide Excel Programming 1 August 3rd 09 11:07 PM
while my c# code running ,clicks on excel document interrupts code Kayıhan Excel Programming 2 April 8th 09 11:54 AM
Excel97: Show UserForm while running code? Kozo Morimoto Excel Programming 3 August 11th 05 10:37 AM
Problem running code behind a userform cdb Excel Programming 17 February 10th 05 03:53 PM


All times are GMT +1. The time now is 11:49 PM.

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"