Ask Your Question

dispatcher doesn't work in a Loop [Solved] [closed]

asked 2015-12-21 04:31:20 +0200

macroman gravatar image

I am trying to paste the same text into multiple cells via a loop function:

    For n = 1 to TextTables(2).getRows().getCount() - 1
        Range = TemplateDoc.TextTables(2).getCellByPosition(4, n)
            dim args2(0) as new
            args2(0).Name = "SelectedFormat"
            args2(0).Value = 10
            dispatcher.executeDispatch(Frame, ".uno:ClipboardFormatItems", "", 0, args2())  

Currently I am getting the following error after the first pass: BASIC runtime error. An exception occurred Type: Message: sequence element is not assignable by given value!.

Any ideas???

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-12 02:51:46.220400

1 Answer

Sort by » oldest newest most voted

answered 2015-12-21 04:30:37 +0200

macroman gravatar image

dim args2(0) outside of For loop and the problem is resolved.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-12-21 04:14:52 +0200

Seen: 446 times

Last updated: Dec 21 '15