Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default UserForm_Initialize()

Is there a way to basically re-run the Sub UserForm_Initialize() so
when the form is re-displayed it will run it again?

There is code in the Sub UserForm_Initialize()that needs to be ran
each time the userform is displayed, it will determine if a button is
displayed or not, and if the form had been viewed (loaded) before in
the session, it will not check the location to see if the button
should be displayed or not.

The only other thing I can think of doing is maybe a function in a
separate module that will set that button on that userform when
called?

Please help.

Thanks

Joe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default UserForm_Initialize()

Joe,

UserForm_Activate

Jim Cone
San Francisco, CA

"Joe Derr" wrote in message om...
Is there a way to basically re-run the Sub UserForm_Initialize() so
when the form is re-displayed it will run it again?

There is code in the Sub UserForm_Initialize()that needs to be ran
each time the userform is displayed, it will determine if a button is
displayed or not, and if the form had been viewed (loaded) before in
the session, it will not check the location to see if the button
should be displayed or not.

The only other thing I can think of doing is maybe a function in a
separate module that will set that button on that userform when
called?

Please help.

Thanks

Joe

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default UserForm_Initialize()

In case you don't understand the answer, Jim means move the code from the
Initialize event to the Activate event.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jim Cone" wrote in message
...
Joe,

UserForm_Activate

Jim Cone
San Francisco, CA

"Joe Derr" wrote in message

om...
Is there a way to basically re-run the Sub UserForm_Initialize() so
when the form is re-displayed it will run it again?

There is code in the Sub UserForm_Initialize()that needs to be ran
each time the userform is displayed, it will determine if a button is
displayed or not, and if the form had been viewed (loaded) before in
the session, it will not check the location to see if the button
should be displayed or not.

The only other thing I can think of doing is maybe a function in a
separate module that will set that button on that userform when
called?

Please help.

Thanks

Joe



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default UserForm_Initialize()

Thank you!

Private Sub UserForm_Activate()

End Sub

Works GREAT. I am using this else where in my code for other things I
wanted to do, and couldn't get them to work.

Thanks again!

Joe


"Jim Cone" wrote in message ...
Joe,

UserForm_Activate

Jim Cone
San Francisco, CA

"Joe Derr" wrote in message om...
Is there a way to basically re-run the Sub UserForm_Initialize() so
when the form is re-displayed it will run it again?

There is code in the Sub UserForm_Initialize()that needs to be ran
each time the userform is displayed, it will determine if a button is
displayed or not, and if the form had been viewed (loaded) before in
the session, it will not check the location to see if the button
should be displayed or not.

The only other thing I can think of doing is maybe a function in a
separate module that will set that button on that userform when
called?

Please help.

Thanks

Joe

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
Calling (Function?) from Userform_Initialize to generate list of unique values for Combo box Alan Excel Programming 2 July 23rd 04 05:40 AM
Userform_Initialize event failing to be called R Avery Excel Programming 2 March 3rd 04 04:06 AM
UserForm_Initialize Rob Excel Programming 2 January 15th 04 02:00 PM
UserForm_Initialize? How to update. Jelso Excel Programming 2 September 5th 03 07:51 AM


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