4

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?

6
  • 1
    That's the personal.xlsb I think... surprised deletion didn't work. You could also just go in that workbook and just remove all code then nothing should fire. Commented Mar 1, 2016 at 23:45
  • Use SysInternals' Process Monitor tool to help you debug file access and where the modules are stored. Commented Mar 1, 2016 at 23:56
  • Hmm, ok. I actually already did go in and delete the code out. However, I am still getting two extra workbooks opened evertime I launch excel. I tried deleting sheets within the workbooks, but I am getting an error message about deleting hidden items. Commented Mar 2, 2016 at 5:26
  • I was able to track down the actual folder that contains these two files using a search in Process Explorer. 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. However, after deleting the two .bas files, they just reappear in the folder when I launch excel. How do I kill the files all together? Commented Mar 2, 2016 at 20:12
  • I also have a hunch that these files are being launched by this: C:\Program Files (x86)\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\VBA\VBA7.1\VBE7.DLL. Does anyone know if I can just delete this file and see what happens? Commented Mar 2, 2016 at 20:25

4 Answers 4

2

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-A6‌​24-496C-BE3B-08CE8AAA200A}\_Microsoft Office 2016\Device\HarddiskVolume1\Users\f370830\AppData\Roaming\Microsoft\Excel\XLSTAR‌​T

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.

Sign up to request clarification or add additional context in comments.

Comments

0

On windows, open the workbook in question. Once opened, press ALT+F11 to open up the VBA editor. From there, right click on the module you want to delete in the left-hand navigation pane, and select DELETE (may be called REMOVE). Excel will likely prompt you to export the module again before removing it; I would suggest saving a copy somewhere but this is entirely up to you.

3 Comments

Thanks for the response. Trying to delete a module, then using the export module feature, is exactly what create my whole problem in the first place. I had already copied the module into a new VBA project so I wanted to delete it. Exporting the modules prior to deleting is what created these two pesky .bas files.
The question was how to temove a PROJECT, not a module. A Projest, which got stuck in you main project after you opened and closed a secondary wbk. At this point the only way I can do this is to close ALL excel, and reopen the main workbook.
Exporting modules is very easy - use something like (adjust vars) Stack does nnot allow me to insert code. Try [email protected]
0

This worked for me:


*************** How to remove the personal.xlsb vba project *******************


Step 1: On Windows Explorer *Click on view tab at the top, three options to the right of file * Click on options * On the drop down menu click on change folder and Search options * Go to view then click show hidden files, folders, and drives * Click apply * Note, the Personal.xlsb is a hidden file thats why the above is done first

Step 2: On windows explorer * Go to Windows-SSD(C:) i.e the C: folder * Double click Users * Double click the user in question, Username * Double click AppData * Double click Roaming * Double click Microsoft * Double click Excel * Double click XLSTART * you should find the "Personal.xlsb" Microsoft Excel binary worksheet * Select and delete

Reference: https://www.youtube.com/watch?v=EXN-nKwfZ5o

1 Comment

Dont't use personal
-1

"Any suggestions for how to delete these files that still show up my VBA project explorer and launch in new windows when I start excel and prevent them from launching every time I start excel?"

You apparently cannot delete an active VBA project if it is running. Close down Excel. Right-click and Open the file containing the VBA Project while holding the Shift key (this disabled Macros from running). In the worksheet you will see a message "SECURITY WARNING Macros have been disabled", DO NOT enable Macros.

Go to Developer tab | Visual Basic, right-click Module1, and Remove module should not be greyed-out. Save and exit. If all the modules are removed from the Project, the Project is removed as well. The principle may be that if the module or code or ActiveX control is being used, it won't let you delete.

1 Comment

Your answer don't solve the problem, wich is related to 2 .bas files that were saved in the XLSTART folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.