ThisWorkbook.Sheets(1).Select (False) Not Working

后端 未结 3 1018
长发绾君心
长发绾君心 2021-01-18 15:28

I have had a piece of code in operation for over 3 years. Suddenly on July 28th, 2016, it stopped working.

It is very simple and I hope it is an easy solve

3条回答
  •  猫巷女王i
    2021-01-18 16:00

    I had the same issue today. Probably delayed because of the update-schedule of my company; likely still the same update. I found your thread and then just before implementing your workaround I found a much simpler one:

    ThisWorkbook.Sheets(1).Select
    ThisWorkbook.Sheets(2).Select (False) ' like holding ctrl
    ThisWorkbook.Sheets(3).Select (False) 
    

    does not work anymore, but

    ThisWorkbook.Sheets(1).Select
    ThisWorkbook.Sheets(2).Select (False) ' like holding ctrl
    ThisWorkbook.Sheets(3).Select (False) 
    ThisWorkbook.Sheets(2).Select (False) ' line 2 again; essential sacrifice for the vba-gods.
    

    does.

提交回复
热议问题