Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel and VBA UserForm - what a hell is going on?

Status
Not open for further replies.

valtersp

Technical User
Aug 29, 2002
15
LV
Hi all!

There are some very strange things going on with Excel's VBA UserForms.

1st - when designing an UserForm, sometimes it becomes corrupted and I don't know, why (expecially, when save excel file as an add-in and edit it later).
2nd - all captions, which are used to name form's controls suddenly disappears after you NORMALLY save & exit (not by pressing ctrl+alt+del on PC's or cmd+opt+esc on MAC's).
But the 3rd is the most... surprising. UserForm "remembers" values previous user input in if Excel not quitted. I've placed a code, setting all values to "" when form Activate/Initialize, but - no cigar!
The strangest thing is - when user form is closed and opened once more, all values are set to "", as it should be.

Can anyone tell me, what is going on in UserForms and how to avoid these oddities.

Thanks!
 
1: It's excel, it's made by M$ - you're surprised ???
2: dunno
3: Be very careful with forms as to whether you are HIDING or UNLOADING them
If you hide, the initialise event will not kick in when the form re-opens but the activate event will
Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top