J
John Michl
I have a simple macro that runs through the presentation and sets the
value of all option buttons to False. Though the code works, I get
an eight second delay AFTER the final message box before I get mouse
control. So the user thinks the process is done but doesn't get
control for eight seconds. What is going on? Is there a faster way
to clear the buttons? Code is below. I get the final message box
almost instantly but then the delay after clicking the button. It
doesn't matter how long I wait to click. I still get an eight or so
second delay. Thanks.
Sub ClearAllValues()
Dim oSld As Slide
Dim oShp As Shape
i = 0
For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type = msoOLEControlObject Then
i = i + 1
'If oShp.OLEFormat.Object.Value = True Then
oShp.OLEFormat.Object.Value = False
End If
Next oShp
Next oSld
MsgBox "Reset is complete. Objects found: " & i
End Sub
value of all option buttons to False. Though the code works, I get
an eight second delay AFTER the final message box before I get mouse
control. So the user thinks the process is done but doesn't get
control for eight seconds. What is going on? Is there a faster way
to clear the buttons? Code is below. I get the final message box
almost instantly but then the delay after clicking the button. It
doesn't matter how long I wait to click. I still get an eight or so
second delay. Thanks.
Sub ClearAllValues()
Dim oSld As Slide
Dim oShp As Shape
i = 0
For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type = msoOLEControlObject Then
i = i + 1
'If oShp.OLEFormat.Object.Value = True Then
oShp.OLEFormat.Object.Value = False
End If
Next oShp
Next oSld
MsgBox "Reset is complete. Objects found: " & i
End Sub