+ Reply to Thread
Results 1 to 3 of 3

Button to change borders

  1. #1
    Registered User
    Join Date
    11-13-2003
    Location
    Co. Durham
    Posts
    2

    Button to change borders

    What I'm after is the VB code to get a button to change a blank cell to have it checked, i.e diagonal lines through it.

    Can anyone help?
    Please help

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Record a macro, select a cell or range of cells, set the border you wish, end recording.
    Select Tools, Macro, and Edit the macro, remove the Range("~~").select line.

    Then select any cell or range and run the macro.

    For a button, do the above, then copy / paste the code into the button on button creation.




    Quote Originally Posted by dixonpeter
    What I'm after is the VB code to get a button to change a blank cell to have it checked, i.e diagonal lines through it.

    Can anyone help?

  3. #3
    StinkeyPete
    Guest

    RE: Button to change borders

    Try this:

    Sub Macro1()
    With Selection.Interior
    .ColorIndex = 0
    .Pattern = xlLightDown
    .PatternColorIndex = xlAutomatic
    End With

    End Sub



    "dixonpeter" wrote:

    >
    > What I'm after is the VB code to get a button to change a blank cell to
    > have it checked, i.e diagonal lines through it.
    >
    > Can anyone help?
    >
    >
    > --
    > dixonpeter
    >
    >
    > ------------------------------------------------------------------------
    > dixonpeter's Profile: http://www.excelforum.com/member.php...fo&userid=2589
    > View this thread: http://www.excelforum.com/showthread...hreadid=395282
    >
    >


+ 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