Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Userform_Initialize event failing to be called

Suppose i have the following code:


sub MySub()
Load frmMyForm

' actions

Unload frmMyForm
end Sub


Further assume that this code executes without Breaking or otherwise
failing to execute the last statement. How come VBA often does not
raise the UserForm_Initialize event when i "Load frmMyForm"? Am I
missing something?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Userform_Initialize event failing to be called

The initialize event is in the workbook module use it to
load the form but do not include any further code.

Sub MySub()
Load frmMyForm
End Sub

The unLoad function is assigned to a close command button
on the form.

Include any code for the various textboxes etc within the
form module. Double click and control to start the code
for the control. These are all Private

Regards
Peter

-----Original Message-----
Suppose i have the following code:


sub MySub()
Load frmMyForm

' actions

Unload frmMyForm
end Sub


Further assume that this code executes without Breaking

or otherwise
failing to execute the last statement. How come VBA

often does not
raise the UserForm_Initialize event when i "Load

frmMyForm"? Am I
missing something?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform_Initialize event failing to be called

Sub Tester5()
For i = 1 To 10
cnt = i
Load frmMyForm

' actions

Unload frmMyForm
Next i

End Sub

fired every time for me.

--
Regards,
Tom Ogilvy


"R Avery" wrote in message
...
Suppose i have the following code:


sub MySub()
Load frmMyForm

' actions

Unload frmMyForm
end Sub


Further assume that this code executes without Breaking or otherwise
failing to execute the last statement. How come VBA often does not
raise the UserForm_Initialize event when i "Load frmMyForm"? Am I
missing something?



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
Failing IF Statement Jemsilve Excel Discussion (Misc queries) 2 November 9th 07 09:23 PM
COUNTA failing? dpenny Excel Discussion (Misc queries) 4 July 24th 06 06:52 PM
UserForm_Initialize Rob Excel Programming 2 January 15th 04 02:00 PM
Save Event - Determine if called by code or user David Sedberry Excel Programming 0 October 2nd 03 04:56 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 10:45 PM.

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"