How to Remove Or Replace a File in XLSTART Using VBA?

ransomedbyfire

Board Regular
Joined
Mar 9, 2011
Messages
121
I made an add-in for someone else using VBA. But I made it by making an XLS file and then setting the IsAddin property to true and placing it in C:\Users... \Microsoft\Excel\XLSTART.

Now, I need to replace the add-in with an updated file. But I can't figure out how to do this since the previous version will be running when Excel is opened other than to have the person manually put the new file in XLSTART. But XLSTART is hidden, and I don't want to have to explain to them how to get there.

How can I automate this?

Thanks!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I doubt that this is (easily) possible in code but maybe

Code:
Application.DisplayAlerts = False
'change the file
Application.DisplayAlerts = True

Untested and may well not work :warning:

Another way might be to close all files except ThisWorkbook then try.
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,628
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top