Share via

Delete VBA Project

Anonymous
2016-04-28T23:47:57+00:00

My excel worksheet is converting all formulas to values automatically. And also formatting them to fractions. In the Visual Basic window I see:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub

I selected and deleted the above text, but it doesn't go away.

There's only one tab in the worksheet. Couldn't find any hidden tabs.

My XLSTART folders are empty. When I try to move the only tab in the worksheet to a new workbook, the error message is : "There needs to be at least one visible sheet in the workbook." But, there is one visible tab.

I've never used VBA or macros with this worksheet, but I possibly copied something in from another file. Any ideas for me? Thanks.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

12 answers

Sort by: Most helpful
  1. OssieMac 48,001 Reputation points Volunteer Moderator
    2016-05-03T22:29:56+00:00

    I don't have any problems with the file so I am assuming that the problem is with your Excel or another file on your computer that is accessing it.

    If you have saved as a csv and then closed the file and closed Excel and then re-opened then the workbook should be clean. On the surface it would appear that you have another problem with your Excel installation. However, you say this does not occur with other excel files so I don't think I can help any further.

    In a previous post you said that you could not move the worksheet to another workbook because a workbook must have at least one sheet. This would have been due to attempting to move the last worksheet out of a workbook which would have left the source workbook with no worksheets. If you only have one worksheet in a workbook then if you want to move it out then add another sheet to the workbook first. (Doesn't matter if it is a blank sheet just so long as the workbook is left with a worksheet in it). Alternatively check the box to "Create a copy" so that the worksheet is not moved out but a copy is made in the new workbook.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-04-29T16:42:36+00:00

    When I save, I get this: "The following features cannot be saved in macro-free workbooks: - VB Projects. To save a file with these features, click No, and then choose a macro-enabled file type in the File Type list."

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-04-29T16:40:02+00:00

    FAIL - The .csv trick worked for a while, now the automatic reformatting is back. But only for the one file. I have several other excel file open and they are not getting the automatic reformatting. Drat.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-04-29T16:03:40+00:00

    Thanks. This workbook was probably started two or three ex-employees ago. I tried Copy and Paste Values for the entire worksheet to a blank file and the reformatting condition continues. My C: drive has no .xlsb files. SOLUTION - I saved the file as a .csv file. Then, when I saved it again as .xlsx, the problem is gone.

    Was this answer helpful?

    0 comments No comments
  5. OssieMac 48,001 Reputation points Volunteer Moderator
    2016-04-29T06:45:10+00:00

    Did you create this workbook? If not, go back to the person who did.

    If you create another workbook from scratch, does it also do the same things?

    Do you have a Personal.xlsb workbook containing macros? If so, try re-naming it so it is disabled. See the following link for some more info in locating problems with the personal.xlsb.

    http://answers.microsoft.com/en-us/office/forum/office_365hp-excel/excel-365-does-not-exit-when-a-workbook-is-closed/3af000ca-10d6-4dbf-8e9e-486f9e939b8f

    Was this answer helpful?

    0 comments No comments