Results 1 to 7 of 7

Thread: Setting submenu item Checked results in error 387

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2017
    Posts
    761

    Question Setting submenu item Checked results in error 387

    Hello!

    I have a menu with an item ("mnu1") which has a submenu ("mnu1_b")

    Before I added the submenu, all was fine.

    Now, after adding the submenu, I can no longer set the item checked.

    Error 387 is raised: "Checked property can not be set for this control element.

    The error is raised when I just hover over "mnu1". The hovering seems to results in a click which then calls the click code stated below. However, I don't see what's wrong with my code.

    What am I missing here?

    Here is a better example: I have photoshopped it. It's not possible. When I try to set the check in the menu editor, VB6 says "Setting this menu item to Checked is not possible".
    But why, and what are would be an alternative?

    Name:  not possible1.png
Views: 1175
Size:  7.6 KB

    Thank you!

    Name:  err1.jpg
Views: 1545
Size:  21.7 KB

    Code:
    Option Explicit
    
    Private Sub mnu1_Click()
    
        Dim b As Boolean
        b = Me.mnu1.Checked
        
        b = Not b
        
        Me.mnu1.Checked = b
        
    End Sub
    Last edited by tmighty2; May 5th, 2022 at 08:42 AM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width