Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Event when a user form is loaded


I am using Excel 2000 and I want some event to triger whenever my user
form is loaded.

Ex: I have a user form with 6 edit boxes and I want to enable only few
edit boxes depending on the situation at which the user form is
called.

How should I capture the event the user form is loaded. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=527224

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Event when a user form is loaded

Hi,
have the various procedures that initialize the form pass to your
userform initialize code something you can use to test it--something
like:
'Public myTest as boolean
If myTest1 = True then UserForm1.TextBox1.Enabled = True

HTH--Lonnie M.

shashi1515 wrote:
I am using Excel 2000 and I want some event to triger whenever my user
form is loaded.

Ex: I have a user form with 6 edit boxes and I want to enable only few
edit boxes depending on the situation at which the user form is
called.

How should I capture the event the user form is loaded. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=527224


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Event when a user form is loaded

Hi Shashi,

You can use the userform_initialize event in your userform code window ...

Private Sub Userform_Initialize()
'your code here..
End Sub

HTH

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM


"shashi1515" wrote
in message ...

I am using Excel 2000 and I want some event to triger whenever my user
form is loaded.

Ex: I have a user form with 6 edit boxes and I want to enable only few
edit boxes depending on the situation at which the user form is
called.

How should I capture the event the user form is loaded. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile:
http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=527224



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Event when a user form is loaded

The user for will have a couple of events that will do what you wnat. There
is initialize which is the code which runs the first time the userform is
loaded. The second event is activate which is the code that is run each time
the userform is loaded. Add these event to the uer form (select them from the
drop down menus in the code for the userform) and add a message box to them
something like this...

Private Sub UserForm_Activate()
MsgBox "Activate"
End Sub

Private Sub UserForm_Initialize()
MsgBox "Initialize"
End Sub
--
HTH...

Jim Thomlinson


"shashi1515" wrote:


I am using Excel 2000 and I want some event to triger whenever my user
form is loaded.

Ex: I have a user form with 6 edit boxes and I want to enable only few
edit boxes depending on the situation at which the user form is
called.

How should I capture the event the user form is loaded. Please help.

Thanks,
Shashi


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=527224


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Event when a user form is loaded


Thank you all for your replies. I got it.


--
shashi1515
------------------------------------------------------------------------
shashi1515's Profile: http://www.excelforum.com/member.php...o&userid=31109
View this thread: http://www.excelforum.com/showthread...hreadid=527224

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 Initialize Event Issues Randy[_10_] Excel Programming 3 December 4th 05 11:20 AM
keyboard event in user form gpjb Excel Programming 3 June 27th 05 11:13 PM
event to know after data has loaded Eric[_27_] Excel Programming 3 February 27th 05 09:23 AM
Help! Animated gif-image in form does not show animation when form loaded JoCa Excel Programming 4 September 23rd 04 07:43 PM
user form-on open event? keydown event? FSt1[_3_] Excel Programming 2 August 5th 04 02:26 PM


All times are GMT +1. The time now is 05:00 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"