How can I change a button when it's pressed?

I am using Impress to create a quiz for my students. I have a grid of shapes which jump to another slide with a question on it when pressed. When the question is answered, it goes back to the grid screen. Imagine a “Jeopardy” board or something like that.

I would like to change the colour of the button after it has been pressed so that it’s obvious to me and the students which questions have already been answered. I have been through many macro tutorials, but I cannot work it out.

Is this possible?

I have done similar, only I have the button add a number to a cell, than use that cell to say something in another, with the IF and the CONCATENATE commands in a cell.
The sub below I created by “Tools/Macros/record macro”. then I called “Entered_1_in_a_cell_H_11” in the sub which was assign to the button. Good luck.

sub Entered_1_in_a_cell_H_11
rem define variables
dim document as object
dim dispatcher as object
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = “ToPoint”

args1(0).Value = “$H$11”

dispatcher.executeDispatch(document, “.uno:GoToCell”, “”, 0, args1())
dim** args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = “StringName”
args2(0).Value = "1"
dispatcher.executeDispatch(document, “.uno:EnterString”, “”, 0, args2())
dispatcher.executeDispatch(document, “.uno:JumpToNextCell”, “”, 0, Array())
end sub

I am using Impress rather than Calc for this. Is there a way to use your method in Impress?

I am not sure if it will?