Hi Ennio-Sr, On Sat, Jul 02, 2005 at 19:31:04 +0200, Ennio-Sr wrote:
> Dim oCellAddress As new com.sun.star.table.CellAddress > oCellAddress.Sheet = Sheet_x ' -->>>>> It was 0 <<<<<<-- ' The first sheet > oRanges.addNewByName(sName$,xcl$,oCellAddress,Sheet_x) ' --->>> was 0) What is the content of xcl$? Btw, you're misusing the 4th parameter, it should be a set of bit constants, and only works here by incident because Sheet_x==0. > 'AT THIS POINT THE RANGE IS CREATED AS SH_TWO.$J$72 ?!!!!!!!!!!!!!!! I assume that the sheet name used in xcl$ is not an absolute address. Contrary to Excel, Calc distinguishes between absolute and relative sheet names, so if you insert a name referring Sheet_x when your active sheet is Sheet_x and then switch to Sh_two and view the defined name you'll see Sh_two. If you don't want that, prefix the sheet name with a '$' dollar sign. > In other words, it seems impossible to keep the named ranges sticking to > the sheet in which they are apparently created. True. Defined names are global to the document. Eike -- OOo/SO Calc core developer. Number formatter bedevilled I18N transpositionizer. GnuPG key 0x293C05FD: 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
