Consulting

Results 1 to 11 of 11

Thread: Problem with checkbox's

  1. #1
    VBAX Regular
    Joined
    Apr 2023
    Posts
    6
    Location

    Problem with checkbox's

    Changing and restoring the visbility setting of a checkbox disables its ability to be ticked until the slide show is stopped and restarted.
    I've tried manipulating various settings such as locked at the same time but can't find anything that works.
    Any advice on what might be going wrong?

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    You might want to say what code you are using to hide / show the checkbox.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Apr 2023
    Posts
    6
    Location
    Quote Originally Posted by John Wilson View Post
    You might want to say what code you are using to hide / show the checkbox.
    Sub Lockclosed()
    Dim i As Integer
    Dim A As String
    A = InputBox("Sorry, only teachers can use this")
    If A = "magister" Then
    Slide7.Shapes("CheckBox1").Visible = True
    For i = 1 To 52
    ActivePresentation.Slides(i).Shapes("Oval77").Visible = False
    ActivePresentation.Slides(i).Shapes("Hint").Visible = False
    ActivePresentation.SlideMaster.Shapes("Lockopen").Visible = True
    ActivePresentation.SlideMaster.Shapes("Lockclosed").Visible = False
    Next i
    End If
    End Sub
    
    Sub Lockopen()
    Dim i As Integer
    Slide7.Shapes("CheckBox1").Visible = False
    For i = 1 To 52
    ActivePresentation.Slides(i).Shapes("Oval77").Visible = True
    ActivePresentation.Slides(i).Shapes("Hint").Visible = True
    ActivePresentation.SlideMaster.Shapes("Lockopen").Visible = False
    ActivePresentation.SlideMaster.Shapes("Lockclosed").Visible = True
    Next i
    End Sub
    Last edited by Aussiebear; 05-25-2023 at 01:46 PM. Reason: Added code tags to supplied code

  4. #4
    VBAX Regular
    Joined
    Apr 2023
    Posts
    6
    Location
    As the checkbox functionality is unaffected until I change its visibility setting I've tried hiding and displaying it using a shape above it. This failed because the checkbox always displays above the shape when in display mode, regardless of the z order set in edit mode.

  5. #5
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Does this format work

    Slide7.Shapes("CheckBox1").OLEFormat.Object.Visible = True
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  6. #6
    VBAX Regular
    Joined
    Apr 2023
    Posts
    6
    Location
    I've solved the problem - leaving the visbility of the checkbox alone but setting the z order to 0 in the code when I want it hidden.

  7. #7
    VBAX Regular
    Joined
    Apr 2023
    Posts
    6
    Location
    Sorry, I missed your response, but I've resolved the problem another way in the meantime. I set the z order to 0 in the code. The checkbox seems to ignore the z order setting of the edit view selection pane, but it works by setting it in the code. Thanks for your help.

  8. #8
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    To the best of my knowledge z order cannot be set to 0. What code did you use?
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  9. #9
    VBAX Regular
    Joined
    Dec 2020
    Posts
    6
    Location
    it works


    Set shp = sld.Shapes("CheckBox1")
    shp.ZOrder msoBringForward
    shp.ZOrder msoSendToBack

  10. #10
    VBAX Regular
    Joined
    Dec 2020
    Posts
    6
    Location
    Quote Originally Posted by chronjy View Post


    Set shp = sld.Shapes("CheckBox1")
    shp.ZOrder msoBringForward
    shp.ZOrder msoSendToBack

  11. #11
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    That doesn't set it to 0 though but as long as it works for you.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •