+ Reply to Thread
Results 1 to 5 of 5

How to change Button Caption?

  1. #1
    Registered User
    Join Date
    08-18-2004
    Posts
    97

    How to change Button Caption?

    Hi Forum,

    Could you help me understand if there is a way to change the caption in a button when the sheet is protected?

    Already have this code running Ok when the sheet is NOT protected; even runs well if i set on the "Allow other users to" Edit Objects in the Protection/Tools Menu. Unfortunately, i have more Objects in the sheet that i don't want to be edited or moved by the user. Is there a way to do the change of caption in the button with the Protection on?

    Any help or leading ideas appreciated, thanks for your thinking.

    Jose

    This is what i have written so far:

    If "condition1" Then
    ActiveSheet.Buttons("BotonAvisos").Caption = "Click para ver Avisos de Error"
    With ActiveSheet.Buttons("BotonAvisos").Characters(Start:=1,Length:=30).Font
    .Name = "Geneva"
    .FontStyle = "Bold"
    .Size = 14
    .ColorIndex = 3
    End With
    Else
    ActiveSheet.Buttons("BotonAvisos").Caption = "Datos OK"
    With ActiveSheet.Buttons("BotonAvisos").Characters(Start:=1, Length:=8).Font
    .Name = "Geneva"
    .FontStyle = "Bold"
    .Size = 18
    .ColorIndex = 10
    End With
    End If

  2. #2
    Registered User
    Join Date
    08-20-2003
    Location
    Luton, England
    Posts
    63
    The usual way is to unprotect in code, make the change, then reprotect.
    Regards
    BrianB
    Most problems are caused by starting from the wrong place.
    Use a cup of coffee to speed up all Windows processes.
    It's easy until you know how.
    -----------------------------------------

  3. #3
    William Benson
    Guest

    Re: How to change Button Caption?

    can you reply to the original message so we can see the thread this went
    with?
    "BrianB" <BrianB.1pwg6k_1117548314.343@excelforum-nospam.com> wrote in
    message news:BrianB.1pwg6k_1117548314.343@excelforum-nospam.com...
    >
    > The usual way is to unprotect in code, make the change, then reprotect.
    >
    >
    > --
    > BrianB
    >
    >
    > ------------------------------------------------------------------------
    > BrianB's Profile:
    > http://www.excelforum.com/member.php...info&userid=55
    > View this thread: http://www.excelforum.com/showthread...hreadid=373490
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: How to change Button Caption?

    Click under Brian's sig:

    http://www.excelforum.com/showthread...hreadid=373490


    This is being posted in excelforum. apparently they are sending postings to
    the newgroup today. The had stopped doing that for a long time, so the
    thread was never posted here.

    --
    Regards,
    Tom Ogilvy


    "William Benson" <wbenson1@nycap.rr.com> wrote in message
    news:e$5sbhgZFHA.1044@TK2MSFTNGP10.phx.gbl...
    > can you reply to the original message so we can see the thread this went
    > with?
    > "BrianB" <BrianB.1pwg6k_1117548314.343@excelforum-nospam.com> wrote in
    > message news:BrianB.1pwg6k_1117548314.343@excelforum-nospam.com...
    > >
    > > The usual way is to unprotect in code, make the change, then reprotect.
    > >
    > >
    > > --
    > > BrianB
    > >
    > >
    > > ------------------------------------------------------------------------
    > > BrianB's Profile:
    > > http://www.excelforum.com/member.php...info&userid=55
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=373490
    > >

    >
    >




  5. #5
    Registered User
    Join Date
    08-18-2004
    Posts
    97

    Thank you

    Thanks Brian for your response, it help me find the way...

    Regards
    Jose Luis

    Quote Originally Posted by Tom Ogilvy
    Click under Brian's sig:

    http://www.excelforum.com/showthread...hreadid=373490


    This is being posted in excelforum. apparently they are sending postings to
    the newgroup today. The had stopped doing that for a long time, so the
    thread was never posted here.

    --
    Regards,
    Tom Ogilvy


    "William Benson" <wbenson1@nycap.rr.com> wrote in message
    news:e$5sbhgZFHA.1044@TK2MSFTNGP10.phx.gbl...
    > can you reply to the original message so we can see the thread this went
    > with?
    > "BrianB" <BrianB.1pwg6k_1117548314.343@excelforum-nospam.com> wrote in
    > message news:BrianB.1pwg6k_1117548314.343@excelforum-nospam.com...
    > >
    > > The usual way is to unprotect in code, make the change, then reprotect.
    > >
    > >
    > > --
    > > BrianB
    > >
    > >
    > > ------------------------------------------------------------------------
    > > BrianB's Profile:
    > > http://www.excelforum.com/member.php...info&userid=55
    > > View this thread:

    http://www.excelforum.com/showthread...hreadid=373490
    > >

    >
    >

+ 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