I created a "Button" on the spreadsheet, and wrote a routine to be followed opn clicking the button. This was so that I could easily test the routine. Once it worked as I wanted, I deleted that Button, and instead created a Button on the "Add-in" Tab of the command bar; obviously, calling that same routine.
This routine starts by testing that the cursor is in Column A, and then tests that various related cells have certain information. If that is correct, the routine then carries out some calculations, inserts some lines and inserts various formula into various cells.
It did all work just FINE - until I changed the entry from a Button on the Sheet to one on the Command Bar
But the very first line fails !
---------------------------------
Public Sub AddDim()
Dim myCell As Range
myCell = ActiveCell
---------------------------------
Run time error 91
Object variable or With block variable not set.
--------------------------------------
Bookmarks