hi,
it’s like minefield potshooting, whereever i look i stumble in new strange things,
i’ll try to attach a file, it contains a macro with strange behaviour,
( !!! the macro is neither well written nor ‘good’ or finished, it’s patchworked from parts i found in the web, but: sometimes it works, and sometimes it doesn’t … !!! )
(to use the file you’ll likely have to disable form-control ‘design-mode’ by clicking - view - toolbars - form-controls - and there uncheck ‘design mode’, it’s neccessary when you see the push-button with ‘drag-points’ on it, i don’t know why that point sometimes enables itself)
tested with LO calc 6.2.8.2 and 7.0.0.0.a0+:
issue 1: the macro in the file works fine when opening macro editor and stepping through it with F8,
while it fails - doesn’t paste in A12, B12 or A11:CV110 - when it’s started by the push button in cell A3,
issue 2: executing the macro by tools - macros - run macro depends on the previous action,
after macro editor stepthrough: run macro works,
after push button: run macro fails,
a sort of a ‘state machine’, not my idea of a reliable algorithm,
i’m interested in two things:
I. rework the macro or button to work from push button
II. why? did above issue occur? an algorithm that could work shouldn’t be dependent on previous actions,
add. info: when i copy the macro code into ‘my macros’ i get the additional possibility to start it with an assigned keyboard shortcut, that worked better. but i’d like to have the macro ‘in’ the file to be able to give it to other people to meter their system in a cheap and fast way.
i’ve learned that similar issues struck other users, macro works but not from push button, e.g.:
thus i think there might be an issue, and not my system being ‘bad’.
this question is to ‘check the field’ before filing a bug.
regards,
b.