If your Add-on needs to execute a google.script.run() to go back to Apps to do something, like get or update data, that might take a little while to do. In these cases, it's good to show a spinner in your sidebar for the duration.
One way is to change the cursor style to a spinner, but better just to plant a spinner gif in the middle of your add-in.
Here's a pre-baked one you can use. You can try it out at this jsfiddle or below.
The styling is all about getting the spinner in the center of the page and is self explanatory from the comments below
In this demo example I just use a button to turn the spinner off and on. In your Add-on you'd use kicking off and getting the result from google.script.run() as the triggers for hiding and showing the spinner - something like this
You just need a div with the spinner class, containing the image you want to use as a spinner. You can use mine if you like.
For more like this, see Google Apps Scripts snippets. Why not join our community , follow the blog, twitter, G+ .
You want to learn Google Apps Script?
Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Google Apps Scripts snippets >