On Wed, Apr 30, 2008 at 5:35 PM, Francois Gatto <[EMAIL PROTECTED]> wrote:
> Salve, > > Provi con questa macro > > Sub SetNumFormat > dim aLocale as new com.sun.star.lang.Locale > dim oDoc as object > dim oSelect as object > dim sFormat as string > dim lNumFormat as long > aLocale.Language = "fr" : aLocale.Country = "FR" > oDoc = ThisComponent > oSelect = oDoc.CurrentSelection > sFormat = "[blue]+ # ##0,00;[red]- # ##0,00" > lNumFormat = oDoc.getNumberFormats().queryKey( sFormat, aLocale, TRUE) > if ( lNumFormat = -1 ) then > lNumFormat = oDoc.getNumberFormats().addNew ( sFormat, aLocale ) > end if > oSelect.NumberFormat = lNumFormat > > End Sub > > Per me non ho problema. > > Francesco Gatto Ti ringrazio innanzitutto della risposta :( Ho provato la tua macro (sostituendo solo i country e language code con "it") ma non ha sortito l' effetto voluto: la formattazione delle celle dopo l' esecuzione e' quella numerica standard :( C' e' una lista di tutti i NumberFormat? Grazie :)
