+ Reply to Thread
Results 1 to 6 of 6

Cell properties dialog

  1. #1
    Jos Vens
    Guest

    Cell properties dialog

    Hi,

    I'd like to know how I can show the Cell-properties dialog from within VBA?

    As my sheet is protected, the cell properties-item is disabled (greyed out)
    in the format-menu. But, in a button, I could unprotect the sheet, then
    show the dialog, and afterwards, protect again. Or isn't it that simple?

    Thanks
    Jos Vens



  2. #2
    Jim Rech
    Guest

    Re: Cell properties dialog

    I don't know of any reason your approach shouldn't work.

    CommandBars.FindControl(, 855).Execute

    --
    Jim
    "Jos Vens" <[email protected]> wrote in message
    news:OR%[email protected]...
    | Hi,
    |
    | I'd like to know how I can show the Cell-properties dialog from within
    VBA?
    |
    | As my sheet is protected, the cell properties-item is disabled (greyed
    out)
    | in the format-menu. But, in a button, I could unprotect the sheet, then
    | show the dialog, and afterwards, protect again. Or isn't it that simple?
    |
    | Thanks
    | Jos Vens
    |
    |



  3. #3
    Tom Ogilvy
    Guest

    Re: Cell properties dialog

    Change the takefocusonclick property of the commandbutton to false:

    Private Sub CommandButton1_Click()
    Me.Unprotect
    CommandBars("Cell").ShowPopup
    Me.Protect
    End Sub

    --
    Regards,
    Tom Ogilvy

    "Jos Vens" <[email protected]> wrote in message
    news:OR%[email protected]...
    > Hi,
    >
    > I'd like to know how I can show the Cell-properties dialog from within

    VBA?
    >
    > As my sheet is protected, the cell properties-item is disabled (greyed

    out)
    > in the format-menu. But, in a button, I could unprotect the sheet, then
    > show the dialog, and afterwards, protect again. Or isn't it that simple?
    >
    > Thanks
    > Jos Vens
    >
    >




  4. #4
    Jos Vens
    Guest

    Re: Cell properties dialog

    Hi guys,

    both options are valuable for me! I wonder how I can know the different
    numbers to show other menu's/dialogs, like Jim did? Is there a list or
    something?

    Thanks a lot for your effort!
    Jos

    "Tom Ogilvy" <[email protected]> schreef in bericht
    news:[email protected]...
    > Change the takefocusonclick property of the commandbutton to false:
    >
    > Private Sub CommandButton1_Click()
    > Me.Unprotect
    > CommandBars("Cell").ShowPopup
    > Me.Protect
    > End Sub
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Jos Vens" <[email protected]> wrote in message
    > news:OR%[email protected]...
    >> Hi,
    >>
    >> I'd like to know how I can show the Cell-properties dialog from within

    > VBA?
    >>
    >> As my sheet is protected, the cell properties-item is disabled (greyed

    > out)
    >> in the format-menu. But, in a button, I could unprotect the sheet, then
    >> show the dialog, and afterwards, protect again. Or isn't it that simple?
    >>
    >> Thanks
    >> Jos Vens
    >>
    >>

    >
    >




  5. #5
    Jim Rech
    Guest

    Re: Cell properties dialog

    There's only a couple thousand so I memorized them.<g> Actually I was
    wishing for a quick and easy way but I used this code in the Immediate
    window:

    ?Commandbars("Format").Controls(1).Id



    --
    Jim
    "Jos Vens" <[email protected]> wrote in message
    news:[email protected]...
    | Hi guys,
    |
    | both options are valuable for me! I wonder how I can know the different
    | numbers to show other menu's/dialogs, like Jim did? Is there a list or
    | something?
    |
    | Thanks a lot for your effort!
    | Jos
    |
    | "Tom Ogilvy" <[email protected]> schreef in bericht
    | news:[email protected]...
    | > Change the takefocusonclick property of the commandbutton to false:
    | >
    | > Private Sub CommandButton1_Click()
    | > Me.Unprotect
    | > CommandBars("Cell").ShowPopup
    | > Me.Protect
    | > End Sub
    | >
    | > --
    | > Regards,
    | > Tom Ogilvy
    | >
    | > "Jos Vens" <[email protected]> wrote in message
    | > news:OR%[email protected]...
    | >> Hi,
    | >>
    | >> I'd like to know how I can show the Cell-properties dialog from within
    | > VBA?
    | >>
    | >> As my sheet is protected, the cell properties-item is disabled (greyed
    | > out)
    | >> in the format-menu. But, in a button, I could unprotect the sheet,
    then
    | >> show the dialog, and afterwards, protect again. Or isn't it that
    simple?
    | >>
    | >> Thanks
    | >> Jos Vens
    | >>
    | >>
    | >
    | >
    |
    |



  6. #6
    Jos Vens
    Guest

    Re: Cell properties dialog

    Very useful Jim!

    Thanks
    Jos


    "Jim Rech" <[email protected]> schreef in bericht
    news:[email protected]...
    > There's only a couple thousand so I memorized them.<g> Actually I was
    > wishing for a quick and easy way but I used this code in the Immediate
    > window:
    >
    > ?Commandbars("Format").Controls(1).Id
    >
    >
    >
    > --
    > Jim
    > "Jos Vens" <[email protected]> wrote in message
    > news:[email protected]...
    > | Hi guys,
    > |
    > | both options are valuable for me! I wonder how I can know the different
    > | numbers to show other menu's/dialogs, like Jim did? Is there a list or
    > | something?
    > |
    > | Thanks a lot for your effort!
    > | Jos
    > |
    > | "Tom Ogilvy" <[email protected]> schreef in bericht
    > | news:[email protected]...
    > | > Change the takefocusonclick property of the commandbutton to false:
    > | >
    > | > Private Sub CommandButton1_Click()
    > | > Me.Unprotect
    > | > CommandBars("Cell").ShowPopup
    > | > Me.Protect
    > | > End Sub
    > | >
    > | > --
    > | > Regards,
    > | > Tom Ogilvy
    > | >
    > | > "Jos Vens" <[email protected]> wrote in message
    > | > news:OR%[email protected]...
    > | >> Hi,
    > | >>
    > | >> I'd like to know how I can show the Cell-properties dialog from
    > within
    > | > VBA?
    > | >>
    > | >> As my sheet is protected, the cell properties-item is disabled
    > (greyed
    > | > out)
    > | >> in the format-menu. But, in a button, I could unprotect the sheet,
    > then
    > | >> show the dialog, and afterwards, protect again. Or isn't it that
    > simple?
    > | >>
    > | >> Thanks
    > | >> Jos Vens
    > | >>
    > | >>
    > | >
    > | >
    > |
    > |
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1