First post to this forum. Familiar enough with computer stuff, but first time user of Excel. I'm doing this to help a friend.
Excel 2010 on Windows 7 (Ultimate) running in a VirtualBox VM on Debian Linux Stretch
My friend downloaded a free Excel add-in (in an 'xlam' file) which is to file some numbers with the UK tax authorities. There's no support.
The add-in has an installation routine which seems to work fine, and after it runs it saves a workbook 'Book1.xlsm'. When opened in Excel, this file displays a tab showing the name of the add-in, which seems to indicate that the installation has been at least partially successful.
Clicking this tab displays a ribbon with some buttons which have to be clicked in sequence, to set up some constant data and fetch an authorization token from the tax man. This involves the tax man making an automated telephone call to the number that they have for my friend, to give him a six-digit number that has to be entered into the tax man's Website to verify that it's really my friend asking for the token. That all seems to work fine too. When that's all done, the add-in renders a form, so that you can input the data to be sent to The Man.
Here's where it goes belly-up.
There are two dates and a few numbers to be sent. The add-in provides GUI routines to choose the dates (and the numbers) which are supposed to be run by clicking images on the form which it's rendered. The images appear to be calling the correct sub names, but on clicking them the following error message appears:
The xxxxxxx is different for each image/icon but the subs are indeed present in the code in the add-in.
Using 'Developer'->'Visual Basic' I see in the Project pane both the add-in and the workbook. Under the workbook hierarchy of VBAProject (Book1.xlsm) I can see in 'Microsoft Excel Objects' three (what I take to be) spreadsheets: 'Sheet 1', 'Sheet 2', 'Sheet 3', which look like the three spreadsheets that I can see named in tabs at the bottom of the 'normal user' Excel screen, and something called 'ThisWorkbook' which I don't recognize. The only thing that I can find in 'ThisWorkbook' is this code:
I suspect that I've done something silly but I've been searching for days and I haven't found quite what I'm looking for. This thread is close:
https://www.mrexcel.com/forum/excel-questions/557506-cant-run-macro-add-ribbon.html
but unless I'm misunderstanding something it's not quite the explanation. I've seen claims that the buttons and the macros might somehow get disconnected, but that doesn't seem to be the case here. I tested the theory by creating within VBAProject (Book1.xlsm) a module which contains a dummy sub with the same name as one of the not-found subs in the add-in. When I click on an image on the form it runs my dummy sub. I've tried and failed to get the dummy sub to call the real one by explicitly calling Addin_Name!Sub_Name but being a complete novice at all this I'm having syntax an probably other issues doing it that way.
Do these symptoms remind anyone of novice mistakes that people make when installing add-ins?
If you've read this far, thank you.![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Excel 2010 on Windows 7 (Ultimate) running in a VirtualBox VM on Debian Linux Stretch
My friend downloaded a free Excel add-in (in an 'xlam' file) which is to file some numbers with the UK tax authorities. There's no support.
The add-in has an installation routine which seems to work fine, and after it runs it saves a workbook 'Book1.xlsm'. When opened in Excel, this file displays a tab showing the name of the add-in, which seems to indicate that the installation has been at least partially successful.
Clicking this tab displays a ribbon with some buttons which have to be clicked in sequence, to set up some constant data and fetch an authorization token from the tax man. This involves the tax man making an automated telephone call to the number that they have for my friend, to give him a six-digit number that has to be entered into the tax man's Website to verify that it's really my friend asking for the token. That all seems to work fine too. When that's all done, the add-in renders a form, so that you can input the data to be sent to The Man.
Here's where it goes belly-up.
There are two dates and a few numbers to be sent. The add-in provides GUI routines to choose the dates (and the numbers) which are supposed to be run by clicking images on the form which it's rendered. The images appear to be calling the correct sub names, but on clicking them the following error message appears:
Code:
Cannot run the macro 'Book1.xlsm!Open_xxxxxxx', The macro may not be available in this workbook or all macros may be disabled.
The xxxxxxx is different for each image/icon but the subs are indeed present in the code in the add-in.
Using 'Developer'->'Visual Basic' I see in the Project pane both the add-in and the workbook. Under the workbook hierarchy of VBAProject (Book1.xlsm) I can see in 'Microsoft Excel Objects' three (what I take to be) spreadsheets: 'Sheet 1', 'Sheet 2', 'Sheet 3', which look like the three spreadsheets that I can see named in tabs at the bottom of the 'normal user' Excel screen, and something called 'ThisWorkbook' which I don't recognize. The only thing that I can find in 'ThisWorkbook' is this code:
Code:
Private Sub Workbook_Open
End Sub
I suspect that I've done something silly but I've been searching for days and I haven't found quite what I'm looking for. This thread is close:
https://www.mrexcel.com/forum/excel-questions/557506-cant-run-macro-add-ribbon.html
but unless I'm misunderstanding something it's not quite the explanation. I've seen claims that the buttons and the macros might somehow get disconnected, but that doesn't seem to be the case here. I tested the theory by creating within VBAProject (Book1.xlsm) a module which contains a dummy sub with the same name as one of the not-found subs in the add-in. When I click on an image on the form it runs my dummy sub. I've tried and failed to get the dummy sub to call the real one by explicitly calling Addin_Name!Sub_Name but being a complete novice at all this I'm having syntax an probably other issues doing it that way.
Do these symptoms remind anyone of novice mistakes that people make when installing add-ins?
If you've read this far, thank you.