How to stop Excel storing the absolute path to an XLA?

后端 未结 5 782
醉梦人生
醉梦人生 2021-02-02 03:59

I have an XLA file that is to be deployed to a number of users in the organisation as an Excel add-in. My intention is to deploy it to a directory in the user\'s \"documents and

5条回答
  •  抹茶落季
    2021-02-02 04:33

    I simply remove the path with a sub like this one:

    Sub RemoveXlaPath()
    '
    ' Goal: delete the path reference to the add-in, i.e. everything before and including the '!'
    ' ='C:\Program Files (x86)\Microsoft Office\Office14\LIBRARY\populator.xlam'!famedata(...)
    '
        Cells.Replace What:="'C:\*xla*'!", Replacement:="", _
                        LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
                        SearchFormat:=False, ReplaceFormat:=False
    End Sub
    

提交回复
热议问题