Results 1 to 10 of 10

Thread: Programmatically format VBA buttons

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    Yes your assumption is right. You could also try this way as well

    Code:
    If .Controls(i).Name Like "abc*" Then 'begins with abc,"*abc" > ends with abc, "*abc*" contains abc
    '//or use like
    'If .Controls(i).Name = "abc" Then
        .Controls(i).BackColor = RGB(0, 64, 0)
    End If
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0
    Sorted thanks very much +1

  3. #3
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Quote Originally Posted by Belleye View Post
    Sorted thanks very much +1
    Based on who the Threaded View of this forum shows you responded to, I think our messages may have crossed... I think you will want to read the message I posted (Message #5) as I believe it does what you might have been originally looking for.
    Last edited by Rick Rothstein; 09-21-2012 at 02:32 PM.

  4. #4
    Junior Member
    Join Date
    Sep 2012
    Posts
    5
    Rep Power
    0
    LOL yes they did... +1s all round today and that is what I was looking for thanks very much.

Similar Threads

  1. Replies: 5
    Last Post: 04-18-2013, 02:30 AM
  2. Clearing UsedRange Of WorkSheet Programmatically
    By tfurnivall in forum Excel Help
    Replies: 1
    Last Post: 12-04-2012, 09:05 AM
  3. HP Calculator Buttons
    By Howardc in forum Word Help
    Replies: 0
    Last Post: 12-01-2012, 11:12 AM
  4. Add ribbon programmatically to Excel 2010 using VBA
    By heapifyman in forum Excel Ribbon and Add-Ins
    Replies: 6
    Last Post: 07-18-2011, 09:16 PM
  5. Social Network Buttons
    By Excel Fox in forum Den Of The Fox
    Replies: 1
    Last Post: 07-10-2011, 10:15 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
  •