Schriftfarbwechsel mit Überprüfung

Programmierung unter AOO/LO (StarBasic, Python, Java, ...)

Moderator: Moderatoren

clag
********
Beiträge: 3570
Registriert: Di, 27.01.2009 15:30

Re: Schriftfarbwechsel mit Überprüfung

Beitrag von clag »

Hallo Chrigi,

versuch es mal hiermit

Code: Alles auswählen

Sub Main
 oDoc=thisComponent
 Sheet = oDoc.Sheets(0)
 Cell0 = Sheet.getcellbyposition(0, 0)
 Cell1 = Sheet.getcellbyposition(1, 0)

  if Cell0.charcolor=  RGB(0,0,0) then
    Cell0.charcolor=  RGB(255,255,255)
    Cell1.charcolor=  RGB(0,0,0)
  else
    Cell1.charcolor=  RGB(255,255,255)
    Cell0.charcolor=  RGB(0,0,0)
  end if
End Sub
viel Spaß
LG
clag

nutzt: WinXP SP3 / AOO 4.1.10 / Firefox