Hi Markus,
You are you calling the Sub?
If you’re calling form a Ribbon button or shortcut key, it should work fine.
If you’re calling if from inside a function from a cell formula, it won’t work because Excel does not allow you to write to the sheet while calculating.
Your function can just return a result directly.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/a086514c-f22b-45b5-a4bd-9a0e8fbd2adan%40googlegroups.com.