I just learned how to do this – it appears to be an old feature but I hadn’t noticed it yet.
Basically, you insert a picture or text box in a spreadsheet, then right click and choose assign to, and type in the name of the macro function you’ve previously written.
See here for an example. The spreadsheet is just a test for calculating weekdays. There’s a method that allows you to do this in your head, but I kept adding things up wrong, so I built this to let me test myself.