Introduction

Introducing Toasts

Toasts are notifications that pop up from the bottom of your screen, like toast… from a toaster for Excel

Pop your Bread into the Toaster, add Butter & Jam if you like and then wait for the Messages to 'Popup'. You can Toast single slices of Toast or multiple slices. You can change the look and feel of your Toasts by passing in parameters for the Background Colour, Font Colour and Border Size and Colour - that's the Butter & Jam bit! Another neat feature of Toasts is that you can Initialise the Bread Class on Worksheet Activate and then destroy the Class on Worksheet Deactivate, allowing you to Call Toasts at anytime, for example in a Grid with Cell Selections - check out my demo in the Video Section. Toast messages are also HTML, meaning that you can pass just about anything into the HTML, including, CSS formatting, carriage returns, advanced spans and of course VBA Variables

Toasts has been designed to work on both dark and light Excel backgrounds. It is based upon a CodePen by Niall and has been ported, modified, fixed for the IE WebBrowser Control and then customised especially for Excel using VBA by Mark Kubiszyn. Cute Toaster image from imgbin.com

Prerequisites

  • Excel 2013 (Version 5) & Excel 2016 (32bit or 64bit, Version 8)
  • Basic to moderate Excel Skills and some VBA skills to copy the Class Module and add a Code example
  • Windows PC · NOT a Mac!
  • No support is provided for customization of this Software

Features

  • Send multiple Toasts at once to the Screen for 'Stacking'. Change the Background Colour, Font Colour and Border Style of the notifications
  • Use Toasts whilst you run some tasks to inform the user of the progress. Use Toasts in a Worksheet by initialising the Class on Activate and then Destroying the Class on Deactivate allowing you to Popup Toasts with Selection Clicks - check out my Grid example in the Vidoes
  • Toast messages can be enhanced using HTML and CSS for example adding a Webpage link, carriage returns or spans for more advanced formatting
  • Carry on working in Excel whilst the Toasts are displayed. Toast uses a Comfortaa, cursive Font by Google that can be changed in the Class Code Module if required, in fact you can 'Lazy Load' multiple Google Fonts if you wish


Installation

Toasts.xlsm is ready to use (version specific naming of the file will differ with each new release). Open the File and test out all of the Demos. To use Toasts in your own Project, just open Toasts.xlsm and your Project and then go into the VBE Editor. Drag the IToast Class into your Workbook and then just add any of the examples remembering to declare the Private Toasting local variable at the top of your own Code Module. That's it, now get Toasting..!

Usage

Toasts.xlsm



dark Tab
This Sheet contains all of the Demos for Toast overlaid onto a Dark theme which is easier on the eyes and goes hand in hand with my very, very Dark Excel. The Demos include the four basic Toasts, 'justright', 'lightlytoasted', 'scorched' and 'burnt', that can be thought of, and used as, Success, Info/Help, Warning and Error popup Toast messages. There is an example that demonstrates multiple Toasts ie. Toasts, that all popup simultaneously and 'stack' ontop of each other. Another example demonstrates running a task and sending Toasts out during the task as notifications of the progress. Further tasks demonstrate longer messages, messages with parts of the Text formatted with HTML and how to add Butter & Jam to completely reformat the entire Toast

Code for a Toast
Using Toast is easy. Parameter 1 (required!): ToastSlices must comprise of a Text Message, an Optional Timeout and an Optional CSS Style (justright, lightlytoasted, scorched or burnt). Here is the Code for the 4 Basic Toasts (notice the use of the backslash '\' for (')and the double ("") to allow quotes to be passed into the JavaScript):
    
   If Toasting Then Exit Sub
   Toasting = True
   
   Dim Bread As IToast
   Set Bread = New IToast
   
   With Bread
    
      .Toast "toast('This Toast is done \'just right\'', 2500, 'justright')", , 1.5
      .Toast "toast('This Toast is done ""lightly toasted""', 'default', 'lightlytoasted')", , 1.5
      .Toast "toast('This Toast has been scorched!', 'default', 'scorched')", , 1.5
      .Toast "toast('This Toast has been burnt!', 'default', 'burnt')", , 3
   
   End With
   
   Set Bread = Nothing
   Toasting = False
   
The Result
Using the above Code you can see the Results below for the Default Toasts Subroutines 1 and 2:





Carbon Emulation
Toasts can be used to emulate Carbon for the look and feel of a Carbon Dialog interface. This is done by adding the Butter & Jam into the mix like this (notice the addition of 'a' and 'b' which are required parameters for the JavaScript when adding Butter & Jam. They are simply unique identifyers and can be anything you like):
    
   If Toasting Then Exit Sub
   Toasting = True
   
   Dim Bread As IToast
   Set Bread = New IToast
   
   With Bread
    
      .Toast ToastSlices:="toast('A toast that is reformatted in a Carbon style', 'default', 'justright', 'a')", _
      ButterAndJam:=Array("#222222", "#CECECE", "5px solid #2A2A2A", "a"), _
      SetToasterTime:=1.5

      .Toast ToastSlices:="toast('A toast that is reformatted in a Carbon style', 'default', 'justright', 'b')", _
      ButterAndJam:=Array("#222222", "#8EA9DB", "5px solid #2A2A2A", "b"), _
      SetToasterTime:=3
   
   End With
   
   Set Bread = Nothing
   Toasting = False
   
The Result
Using the above Code you can see the Results below for the Adding Butter & Jam Subroutine:



light Tab
This Sheet contains all of the Demos for Toast overlaid onto a Light theme or a normal Excel Spreadsheet look and feel. The Demos include the four basic Toasts, 'justright', 'lightlytoasted', 'scorched' and 'burnt', that can be thought of, and used as, Success, Info/Help, Warning and Error popup Toast messages. There is an example that demonstrates multiple Toasts ie. Toasts, that all popup simultaneously and 'stack' ontop of each other. Another example demonstrates running a task and sending Toasts out during the task as notifications of the progress. Further tasks demonstrate longer messages, messages with parts of the Text formatted with HTML and how to add Butter & Jam to completely reformat the entire Toast





grid Tab
This Sheet when activated initialises a Class instance of IToast as Bread. When deactivated the Class is destroyed. The Sheet features a coloured Grid of Cells that you can click on. As you click away pairs of Toasts are 'popped up' from the Toaster. Try repeated clicking to see how high you can 'stack' the Toasts



protect integrity Tab
This Sheet features a Grid of Cells that if modified in any way ie. over-typed, backspaced, deleted including Sheet Rows and Columns removal, 'popup' a Toast message telling you that you can't do that and that changes will be reverted. Check out the Video below:



Toast

Multiple Toasts. You can generate a single Toast and then send out say, 3 Toasts in quick succession all together

Lots of Toasts. By initialising the Bread as an IToast Class on Worksheet Activation, you can then simply fire as many Toasts as you like with each Mouse Click. The Class is destroyed upon Worksheet Deactivation

FAQ

Q. What happens if I add hundreds of Toasts, where do they all go?

A. They just get 'stacked', one upon another until they disappear off the top of the Excel Workbook, which is the size of the UserForm Window and WebBrowser Control


Toast

This is a video of the default Toasts available. These can be restyled

This is a video of using Toasts for Cell Selection

This is a video of Carbon Emulation for Toast to create Toasts in a Carbon style for a Dark background in Excel

Support

Please remember you have purchased very affordable Software and you have not paid for a full-time Software design agency - I am but one man. Occasionally I may help with small tweaks, but these requests will be put on a much lower priority due to their nature. You have not PAID for Support, Support is 100% optional and I provide it for your convenience, so please be patient, polite and respectful

Support (limited) for my Software includes

  • Responding to questions or problems regarding the Software and its features
  • Fixing valid (replicated) bugs and reported issues for the VERSION I HAVE WRITTEN

Software support does not include

  • Customization and installation services
  • Support for third party software or ANY kind of development whatsoever

Before seeking support

  • Make sure your question is a valid Software Issue and not a customization request
  • Make sure you have read through the FAQ's, online documentation and any related video guides before asking support on how to accomplish a task
  • Ensure that you access to the VBOM is allowed and that Macros can run in Excel
  • Make sure to provide 'proof of purchase' and state the name / version of the Software that you are having issues with when requesting support by Email or via Facebook

How to get Support

Contact Mark Kubiszyn on the Email address provided when you purchased the Software, including the Order Number
...or Contact Mark Kubiszyn via our Facebook Page - remember to be patient, if there has been an issue with your download, Mark will always respond within 48 hours and will Email you the File directly if neccessary or via Messenger. For other issues the response time may be considerably longer and I may choose to respond to specific questions only (as is my right), depending on what has been asked

Future Builds

* Maybe look at other ideas for integrating Toasts into everyday tasks in Excel and other formatting options for the Toasts

* Look at reducing the tiny flicker on the Mouse Cursor when initialising the Class like Snackie

* Look at maybe setting focus back to the main Excel Window when running Toasts - at the moment you just click on a Cell to regain focus to the App as the Toasts popup and then you can start typing, like Snackie

Bug Fixes

* There are currently no bugs identified

Changelog

You can find the version history in the Code Module for any Macro-enabled Software or read more information on the status of each release
- the latest Version including a description of any changes made is always shown first

30.11.2020 - (Version 1.1) Released

Retro-fit ScreenUpdate using WINAPI to prevent the Excel Screen from refreshing
Added margin-bottom 0.7s to the Toast Transition CSS to help fix a slight bug whereby sometines the Toasts don't puch up the previous Toast, they just appear without quite performing any animation
Added Virtual Settings to allow Procedures to store and update the HTML during the Class Initialisation due to the absence of any psuedo-class Initialisation. This includes ToastScale, a new method to allow the Toasts to be Scaled and used a little differently and ToastMargin that lets you increase the gap of the Toasts. ToastLeft allows you to align the Toasts to the left-hand side of the Workbook spaced as required

28.11.2020 - (Version 1) Released

General release of the first version of Toasts