PDA

View Full Version : Solved: Stay on Top Userforms for Excel



CBrine
09-03-2004, 07:50 AM
Don't know if anyone would be interested in this or not, but I thought it was pretty cool. I created this for a Mr Excel request. It's retirement plan years to retirement calculator, which is pretty boring. But the OP wanted the form to stay on top all the time. I setup a API call to make excel the "stay on top form" and with application.visible = false. Viola, you have a kinda vb application, running through the hidden excel application.

Zack Barresse
09-03-2004, 09:05 AM
Oooh, nice!

You should make that a KB entry! :yes

Btw, I error out on this line ...
Birthdate = GetSetting("Retirement", "Date", "Date")
So that should be worked out before submitting. ;)

CBrine
09-03-2004, 10:09 AM
Zack,
Thanks for the test. It was erroring when the registry entry had not yet been created. I've set it up to default to a default date, if no registry entry is found.

Zack Barresse
09-03-2004, 11:28 AM
Criticism (as an-end user):

Show birthday as well as current date on userform.
Make 'Set Birthday' form larger as to see the day numbers
Make 'Set Birthday' button a little more prominent


Well that's what I'd do. I realize this was done per an OP's spec's, just me being critical (I'm really no judge, but I'd like someone to do the same for me). It is really cool though!! Nice job!!

TonyJollans
09-03-2004, 11:43 AM
One small point. This does not work on pre-XP versions (the hWnd property doesn't exist). 'fraid I can't comment further :)

Mike_R
09-03-2004, 03:39 PM
This is easily handled...

Courtesey of Mark007:

http://www.markrowlinson.co.uk/apiuserformhandle.php

:)