+ Reply to Thread
Results 1 to 7 of 7

Home made icon buttons

  1. #1
    Registered User
    Join Date
    01-21-2008
    Location
    Northampton
    Posts
    24

    Home made icon buttons

    Hiya

    For one of the workbooks I am working on it would help if I had two toolbar/icon buttons that changed the text colour. I know there is the button that drops down the colour... but I'm lazy and if I'm switching between colours it would be easier if I had one that made the text green and one that made it blue.

    So.. I'm completely new to this... How do I go about creating an icon with the macro attached to it.

    Also, I will be creating a new version of this spreadsheet every month but I will still need the icons working so I need them to be in my toolbar all the time.

    I have a toolbar that I've made that has a few bits I use regularly so it would be good if I could add them to that one.

    Thanks heaps

  2. #2
    Forum Contributor
    Join Date
    01-13-2006
    Location
    Texas
    Posts
    161

    the easy part

    I can tell you the easy part.

    right click on the menu bar or on one of the open toolbars (standard, formatting, whatever) to see the list of all toolbars supplied with the Excel program.
    Go to the very bottom of the list and left click "customize".
    The customize window will open with the "commands" tab selected.
    On the left side of the window, slide the scroll bar down to the bottom.
    Left click the "macros" item, 3rd from the bottom.
    The right side of the window will show 2 items - "Custom Menu Item" and "Custom Button".
    Left click and drag the "Custom Button" (yellow smiley face) to one of your open toolbars.
    Do NOT close the "Customize" window.
    Right click the new smiley face icon on your toolbar and you will see options to rename, change or edit (create your own) the button image, and to assign a macro to the button.
    If you want to choose green and blue text, you need two buttons.
    After you do all that you can close the "Customize" window.

    I believe the buttons will remain functional on the command bar for any workbook you copy from the original, but I won't swear to that.

    I hope that helps.

    Conor

  3. #3
    Registered User
    Join Date
    01-21-2008
    Location
    Northampton
    Posts
    24
    Conor, that's great!!! Thank you so much!

    Ok, so I've got my icon and it's running the macro, but the macro isn't quite right.

    I want it to turn any area I hightlight red.. but at the moment it has cell references in the script so it only turns a specific area red when i run it.

    This is what I have
    Sub thirty_day_account()
    '
    ' thirty_day_account Macro
    ' Macro recorded 23/01/2008 by Heather Pinfold
    '

    '
    Range("A303:L303").Select
    With Selection.Interior
    .ColorIndex = 3
    .Pattern = xlSolid
    End With
    Range("A303").Select
    End Sub
    Which bit do I change/remove to make it do any area I select?
    Also, at the moment the area has a conditional format that makes 0's white. I would need to make it change that to having 0's red so they still don't show.

    Thanks heaps
    Last edited by evurr; 01-23-2008 at 12:52 PM.

  4. #4
    Forum Contributor
    Join Date
    01-13-2006
    Location
    Texas
    Posts
    161
    remove the line:
    Please Login or Register  to view this content.
    Use you mouse to highlight the cell(s) you want.
    use the "formatconditions" property to reset the cell's conditional formatting.
    Last edited by VBA Noob; 01-23-2008 at 03:52 PM.

  5. #5
    Registered User
    Join Date
    01-21-2008
    Location
    Northampton
    Posts
    24
    this is brilliant, thank you

    you do realise it just leads to more questions though..

    OK, I need other people to have these macros. I've saved them in a personal macro excel file. Can I share this with people? Do I have to create new macro buttons or is there a way of putting the whole toolbar on the spreadsheet so that whoever opens it, on whatever computer they can use these buttons?

    Thanks again!!

  6. #6
    Forum Contributor
    Join Date
    01-13-2006
    Location
    Texas
    Posts
    161
    Thank you, but my input was fairly minimal. I'm glad it helped, but save the "brilliants" for the moderators and people who REALLY know this stuff. As it is, I have reached the limit of my expertise wrt your questions. I'm sure a moderator or other expert will pick it up from here. I actually want to know the answers to the questions you pose, also.

    Good luck.

    Conor

  7. #7
    Registered User
    Join Date
    01-21-2008
    Location
    Northampton
    Posts
    24
    LOL!!! you still helped me heaps!!

    So.... *bump* does anyone know the answer to this question?

    I've made some toolbar buttons and applied "home-built" macros to them.. but I need at least 2 other people to be able to use these on a specific spreadsheet.

    The macros are currently stored on a separate macro sheet.

    I will be creating a new version of this spreadsheet every month.

    Do I have to create them on both of the other computers or is there a way of copying them over.

    thanks heaps

    Heather

+ 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