<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - comportement anormal d'une macro sous calc"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=133575#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - comportement anormal d'une macro sous calc"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=133575">bug 133575</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>Quick translation:
Two sheets, the second contains the expenses of the month summarized by theme
in column O. A macro copies column O in the column (from 1 to 12) of sheet 1
specified in B1.
Last year the macro worked fine. This year it works for target columns from 1
to 11 but no longer for column 12.
Macro
sub copy
dim lig as integer
dim col as integer
dim fs as object
dim f1 as object
dim f2 as object
Dim Sheet As Object
Dim Cell As Object
 Sun o Leaves
  Sun oSheet
  Dim oCell

  fs = ThisComponent.getSheets ()
 f1 = fs.getByIndex (0)
f2 = fs.getByindex (1)
col = f2.getcellbyposition (1,0) .getvalue ()

Dim Dlg As Object

DialogLibraries.LoadLibrary ("Standard")
Dlg = CreateUnoDialog (DialogLibraries.Standard.diacopie)
Ctl = Dlg.getControl ("num")
Ctl.value = col

Select Case Dlg.Execute ()
Box 1
if col> 0 and col <14 then
for lig = 2 to 22
if lig <> 5 then
f1.getcellbyposition (col, lig) .value = f2.getcellbyposition (13, lig)
.getvalue ()
end if
next
end if

box 0

msgbox ("Exit without doing anything")

end select
end sub

Steps to Reproduce:
1.The range O3: O24 of sheet 2 contains numbers. Cell B1 contains the index of
the column in sheet 1 where this range should be stored.
2.we launch the macro copy
3.this works correctly for B1 = 1 to 11 but not for B1 = 12.

Actual Results:
It seems that the macro copies column N and not column O while the index of the
column to copy is hard in the macro

Expected Results:
copy of column O


Reproducible: Always


User Profile Reset: Yes</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>