简体   繁体   中英

Excel VBA: Changes to all sheets on same cell

I am getting a weird error:

I have a workbook with 20 sheets in it. I select one of the sheets and edit one individual cell in that sheet. When I make the change, however, it is changed to that value in the corresponding cell in ALL of the sheets.

So, for example, if the corresponding cells are "apple", "orange", "banana" (Sheet1, Sheet2, Sheet3). When I change "orange" to "grape", the cells are now: "grape", "grape", "grape".

It does not always occur, and sometimes occurs after I run a specific macro, but that macro should not make real-time changes, only when I run the program.

Thank You for the help.

There may be some event-procedure code running for the workbook or worksheet objects.

Right click a sheet-tab and choose View Code . There may be some code shown on the Change or SelectionChange event.

From the Project Explorer on the left, double-click into each worksheet object and the ThisWorkbook object to discover if they contain any code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM