Consulting

Results 1 to 6 of 6

Thread: Solved: Stay on Top Userforms for Excel

  1. #1
    VBAX Mentor CBrine's Avatar
    Joined
    Jun 2004
    Location
    Toronto, Canada
    Posts
    383
    Location

    Solved: Stay on Top Userforms for Excel

    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.
    The most difficult errors to resolve are the one's you know you didn't make.


  2. #2
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,897
    Location
    Oooh, nice!

    You should make that a KB entry!

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

  3. #3
    VBAX Mentor CBrine's Avatar
    Joined
    Jun 2004
    Location
    Toronto, Canada
    Posts
    383
    Location
    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.
    The most difficult errors to resolve are the one's you know you didn't make.


  4. #4
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,897
    Location
    Criticism (as an-end user):

    1. Show birthday as well as current date on userform.
    2. Make 'Set Birthday' form larger as to see the day numbers
    3. 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!!

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    One small point. This does not work on pre-XP versions (the hWnd property doesn't exist). 'fraid I can't comment further
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #6
    VBAX Regular Mike_R's Avatar
    Joined
    May 2004
    Location
    Plainsboro, NJ
    Posts
    46
    Location
    This is easily handled...

    Courtesey of Mark007:

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

    Try out the [VBA] tags!
    Option Explicit, don't leave home without it...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •