79415601

Date: 2025-02-05 17:20:40
Score: 0.5
Natty:
Report link

I spend an afternoon debugging this code.

There is a subtle confusion inside this code : This code take a shortcut when it derived AddIn Title from current Filename. But Excel seems to use the file 'Title" property as AddIn Title, once installed.

This code was write before Office starts using Ribbon. So the Menu and button setup code are useless

Found here, the fix for one error :

        ' https://stackoverflow.com/questions/55054979/constantly-getting-err-1004-when-trying-to-using-application-addins-add
        If Application.Workbooks.Count = 0 Then Set wb = Application.Workbooks.Add()

        ' it's not listed (not previously installed)
        ' add it to the addins collection
        ' and check this addins checkbox
        Application.AddIns.Add Filename:=Application.UserLibraryPath & AddinName  ' ThisWorkbook.FullName, CopyFile:=True

This don't work :

 Workbooks(AddinName) _
            .BuiltinDocumentProperties("Last Save Time")

In a nutshell, be careful, there is a lot of debugging to make this code fully functional.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user27364366