View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2490_] Rick Rothstein \(MVP - VB\)[_2490_] is offline
external usenet poster
 
Posts: 1
Default UserForm_Initialize is not recognized??

Since that situation should not exist, it sounds to me like your file may be
corrupted. Before trying what I am about to suggest, wait to see what others
say about your problem (they may actually have a good answer for you). Okay,
you have been warned.

I'm not sure if this will work or not, but what I would do is copy all the
code from the UserForm and store it in a Notepad text file, then I would
close the UserForm, then close Excel (maybe reboot the computer just in
case), restart Excel, add a UserForm and copy all the code you saved back
into its code window. Hopefully Excel won't *insist* that the UserForm
already exists and everything will be straightened out.

Rick


"Sam Kuo" wrote in message
...
Hi Dave

1) Yes, the code is in the userform module as before when it was still
working.
2) There is no "UserForm" for me to select from the lefthand side
dropdown.
But the form does exists!

So I'm really lost now...Any idea?

Sam

"Dave Peterson" wrote:

And you're sure your in the userform module?

My second guess is that even though you typed in the correct spelling in
your
post, you have a typo in your actual code.

I'd change the lefthand side dropdown to Userform and then choose
Initialize
from the righthand side. Maybe you'll see the typo--or just delete the
line
with the typo and move the generated line to where it belongs.



Sam Kuo wrote:

Hi

I have one form and an event procedure UserForm_Initialize().

This event procedure was working fine before, but somehow Excel doesn't
seem
to recognize the form now (i.e. when I put the cursor within that event
procedure, the object dropdown in the top middle of VB window now shows
"(General)", and "Userform_Initialize" in the event dropdown in the top
left)

Please help me!!

Sam


--

Dave Peterson