Page 1 of 1

[Solved] Specify current cell in macro

Posted: Sat Jan 11, 2025 8:03 pm
by jainagirl
Hello, all:

Is there a way to edit this macro so it refers to the current cell at cursor position, rather than cell D2109?

Sub Blink_It
oSheet = ThisComponent.Sheets(0)
oCell = oSheet.getCellRangeByName("D2109")
Do While True
ocell.CellBackColor = RGB(255, 255, 0)
'Yellow
Wait 1000
'wait 1000 milliseconds
ocell.CellBackColor = RGB(255, 255, 255)
'White
Wait 1000
'wait 1000 milliseconds
Loop
End Sub

Thanks in advance :)

Re: Specify Current Cell in Macro

Posted: Sat Jan 11, 2025 8:27 pm
by Zizi64