I initially created two new modules in a fresh workbook. I accidentally used the "Export File..." feature in the Visual Basic project explorer. This created two new .bas files.
The problem is that now that I have these two objects, they are opening up every time I attempt to launch excel. The files appear to be save in this directory: C:\Users\f370830\AppData\Roaming\Microsoft\excel\XLSTART. Excel points to this directory when I try to save either the VBA object or the excel book that they launch in.
I do not see the files in this directory. I even deleted the directory using both windows explorer and the command line. However these files still show up my VBA project explorer and launch in new windows when I start excel.
Any suggestions for how to delete these files and prevent them from launching every time I start excel?
I was able to solve the issue. Like I mentioned in my comment above, I was able to track down the directory storing the two rogue .bas files using the SysInternals program Process Explorer. The files were being saved here:
C:\appsensevirtual\S-1-5-21-1781428526-1902518210-316617838-164488\{B0970185-A624-496C-BE3B-08CE8AAA200A}\_Microsoft Office 2016\Device\HarddiskVolume1\Users\f370830\AppData\Roaming\Microsoft\Excel\XLSTART
as opposed to the normal 'users' directory. Just deleting the .bas files did not stop the two workbooks from launching when I open excel. For some reason opening excel would recreate the .bas files in the XLSTART folder.
I just deleted the entire XLSTART folder, which solved the problem. A new XLSTART folder was created on my next excel launch.
One small side effect is that excel now opens into a grey screen as opposed to a fresh worksheet. But that isn't a big deal to me, 9 times out of 10 I am opening existing workbooks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With