Excel 2013 worksheet activate

前端 未结 9 1746
情话喂你
情话喂你 2021-01-03 03:28

I have an issue with activating a sheet from a user form, the same code works fine in Excel 2003 to Excel 2010, doesn\'t work with Excel 2013.

This is how to simply

9条回答
  •  攒了一身酷
    2021-01-03 03:48

    I found a possible workaround for a similar situation. We have a complex Excel addin that uses both COM and XLL code. (No VBA) We encountered similar issues as above. (When activating a sheet from a modal dialog, the new cell data appeared on the previous sheet).

    In our case, we discovered that the issue appeared only when our code evaluated a cell Range's ".HasFormula" property. There's no logical explanation. If our compiled .Net code evaluated that property, we would observe the bug. If the code ignored that property, we did not observe the bug. We also found that if we manually clicked back and forth between worksheets (tabs), the bug went away.

提交回复
热议问题