Posts by max_lux

    I have found all the code that will change an entire row or column to a highlighted color, but this doesn't seem to work on a protected sheet if you have cells in the area that is protected.
    What I would like to do, therefore, is simply have the adjacent cell in column A highlighted if anywhere in the row is selected.


    Is this possible with a protected sheet? And if so, ideas?


    I have attached a sheet to demonstrate what I want - if I am working
    in cell H13, I would like cell A13 to be highlighted,
    in cell H21, I would like cell A21 to be highlighted,
    etc. etc.


    All gey cells are/ would be protected.

    Re: Commandbars (Toolbars) Restore Workbook


    Here's the code. If anyone has something to add, then feel free...



    Hi,


    Because I made a workbook which has all commandbars removed, I thought it might be prudent to make a workbook which would restore all standard Excel commandbars, right click, workbook tabs right click,... well, you get the idea. This workbook restores anything that can be disabled with code, back to a state that 99% of users are used to.


    I distribute this with my workbook, and the user can therefore simply open this if they have an Excel crash, rather than phoning me. When the user opens this workbook, it restores everything, and then the user simply clicks an "Ok" button to close the workbook. This makes it easy to use, even for the novice user.


    The worksheet is protected with no password. The VBA project is not protected.


    Feel free to distribute this with your workbooks if you like. I ask you to please not modify the original content. Protect it as you wish.


    Kind regards,


    Please stand-by - I am editing the code - I found one thing I had not been able to restore with this - i will, also, post the code for this prior to uploading it again.

    Re: Custom Commandbar - Buttons On Commandbar


    So far the only thing that doesn't cause an error is:


    Code
    Set cMenu1 = cbMainMenuBar.Controls.Add(Type:=msoControlButton, ID:=113, Before:=10) ' bold
    cbcCustomMenu.BeginGroup = True


    This does:

    Code
    With cbcCustomMenu = cMenu1.BeginGroup = True
    End With


    as does this:

    Code
    With cbcCustomMenu = cMenu1.Controls.Add()
            .BeginGroup = True
    End With


    as does this:

    Code
    With cbcCustomMenu = cMenu1.Controls
            .BeginGroup = True
    End With


    as does this:

    Code
    With cbcCustomMenu = cMenu1.Controls.Add(Type:=msoBarTypeMenuBar)
            .BeginGroup = True
    End With


    as does eveything I try. I know the property can be set, but I can't find an argument to do it... The macro recorder does not record changing this property either...

    Re: Custom Commandbar - Buttons On Commandbar


    Ok here is how Nory helped me - he made my original code into an array code. For the purposes of this forum, the File menu will be shown.


    Norie's code:



    My original code:



    Now, back to something, anyone know how to begin group on a commandbar so it looks like:
    *() simulates button


    File Edit View Window Help |<begin group> (Bold)(Underline) |<begin group> (Align Left)

    Re: Custom Commandbar - Buttons On Commandbar


    lol surely it can be that long. Here's my popup list:


    Re: Custom Commandbar - Buttons On Commandbar


    here is my button code, and the button delete code - i found that i had to order the button numbers backward to delete the buttons, otherwise it left 1 or 2.


    Re: Custom Commandbar - Buttons On Commandbar


    Quote from norie

    Max


    To begin a group use the BeginGroup property.


    Just delete the toolbar, or set their Tag property and use FindControl.


    I've tried setting this, but to no avail. Any suggestions?


    Thanks, btw, you are helpful as always :thanx:

    Re: Custom Commandbar - Buttons On Commandbar


    Again, got it, hehe


    Code
    Application.CommandBars("CamCustom").Controls(1).Delete
        Application.CommandBars("CamCustom").Controls(2).Delete


    which leaves me with just one question... How to begin a group with the bold button?

    Re: Custom Commandbar - Buttons On Commandbar


    Got adding them...


    Code
    Set cMenu1 = cbMainMenuBar.Controls.Add(Type:=msoControlButton, ID:=113)
    Set cMenu1 = cbMainMenuBar.Controls.Add(Type:=msoControlButton, ID:=115)


    Now I need to figure out how to have them start a group. Is that possible?

    Hi, I have a commandbar question. First I shall describe what I am trying to do, which will best serve to convey what I am trying to do.


    I have made a custom commandbar for my workbook, which is built and deleted at open/ close. In this workbook, I have one sheet where I wish the user to be able to use bold and underline, but I do not want to allow access to the formatting commandbar. I could add a "Format" control popup to my custom commandbar, and use macros to achieve the effect, but I would prefer to use toggling system buttons at the end of my commandbar to the right of the help menu.


    Is there possibly any way to do this?


    I know the commandbar IDs of the buttons, and have tried various attempts at both making them appear/ work. I can get an invisible button to show up, but no face is seen and no function is completed when pressing it. Since I am unable to assign a FaceID or other otions to a controlpopup, that is out of the question.
    FaceIDs are:
    Bold= 113
    Underline= 115


    Here is the code, beginning with just before the help menu, and ending with my most successful, yet inadequate remmed out attempt at doing this. If you know how I could do this, I would appreciate your help, and thank-you very much for your help.


    Kind regards,


    Re: Sub Sub Menu


    Thanks Bob :)


    One more question, if I may?


    How would I add actual system menu items (coded), such as Zoom, so it would be available?


    I have completely disabled the worksheet menubar and have my own complete toolbar.

    I am building a toolbar, and I would like to organize some report navigation as follows:


    &Reports
    _______&End Project
    __________________Page &1
    _________________________&Edit
    _________________________Pre&view
    _________________________&Print
    etc.


    Here is my code:



    What I end up with with this code is:


    &Reports
    _______&End Project
    _______Page &1
    ______________&Edit
    ______________Pre&view
    ______________&Print
    etc.


    Is there any way to do this?


    Thanks in advance :)

    Re: Multiple timers (stopwatches) in one worksheet


    I use multiple timers, objects that i move forward/ backward to indicate they are running, a bell that goes off, a message that appears when the bell goes off, and it selects the cell on the applicable sheet when user clicks ok. This works whether minimized/ on another sheet/ in another book, etc.


    Re: Modify Print Preview Options


    Theres a way to grey out a couple buttons in print preview, but they ungrey when one selects close. In short, I have searched these forums and on the net for weeks and haven't found anything that will do that.