Hi!
Now to trigger the sub.
A simple way is to use a command button. Don't be put off by the number of my words. The actions are straightforward.
Locate the Control Toolbox toolbar (View > Toolbars .. and ensure that Control Toolbox is checked).
Ensure your active (visible) worksheet is the one with the numbers on it and the code behind it.
Hover your mouse over the icons on this toolbar and locate the one with the tooltip Command Button. Click on this icon and then use the cursor to draw a modest rectangle on the worksheet.
Double click this new button (which will have "handles" on it at this stage) and you will be taken to the code page you made earlier and your cursor will be in a new sub thus:
Private Sub CommandButton1_Click()
End Sub
In this sub, type divdiv
Now return to the worksheet (use the Excel tab in the taskbar, for example).
Ensure that the command button is active (the first Control Box toolbar icon toggles between Design Mode (which we don't now want) and Exit Design Mode (which we do want). No more handles on the button? OK. Click it.
Alf
Bookmarks