Git Product home page Git Product logo

vba-userform-animations's Introduction

VBA Userform Transitions and Animations

Tools to have transitions and animations with Userforms and Userform controls Similar to CSS Transitions and Animations (kinda lol).

Usage

'EXAMPLE (IN A USERFORM WITH VARIOUS CONTROLS)
Private Sub GoButton_Click()
    
    'SINGLE EFFECT
    Transition Effect(sidebar, "width", 100, 1000)
    
    'CAN ALSO DO EFFECTS ON USERFORMS
    Transition Effect(Me, "Top", 400, 1000)
    
    'MULTIPLE EFFECTS APPLIED AT ONCE WITH DIFFERENT TIMES AND PROPERITES
    Transition Effect(sidebar, "width", 0, 500) _
             , Effect(box, "Top", Me.InsideHeight - box.Height, 1000) _
             , Effect(box2, "Top", 0, 500) _
             , Effect(GoButton, "fontsize", 4, 1000) _
             , Effect(Me, "Top", 100, 1000) _
    
    'MULTIPLE EFFECTS IN A ROW DO AN ANITMATION EFFECT
    Transition Effect(box, "Left", 0, 250), Effect(box, "Top", 0, 250)
    Transition Effect(box, "left", Me.InsideWidth - box.Width, 250)
    Transition Effect(box, "Top", Me.InsideHeight - box.Height, 250)
    Transition Effect(box, "left", 0, 250)
    Transition Effect(box, "Top", 0, 250)
    
End Sub

Public Methods/Functions

  • Transition
  • Effect
  • MicroTimer

Private Methods/Functions

  • AllTransitionsComplete
  • TransitionComplete
  • IncrementElement
  • easeInAndOut

TODO:

  • Change The Way That The Effect Is Called, That Way There Might Be An Option Of What Type Of Effect, Such As Liner, Ease-Out, Ease-In, Possibly Even Bezier Curve.

  • Need To Add A Function For Finding The Userform For Refresh, Currently Just Grabs It From The First Element That Is Added. Works For Now, But Not Very Dynamic.

  • Currently Have A Sleep Hardcoded, Should Look Into Testing Different Things To See If It can Help Reduce Flashing. Again, Works For Now, But Should Be A Better Way.

vba-userform-animations's People

Contributors

todar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.