+ Reply to Thread
Results 1 to 3 of 3

a button to shade and insert text

Hybrid View

sjak a button to shade and insert... 08-13-2008, 08:58 AM
royUK Use the macro recorder to get... 08-13-2008, 09:11 AM
sjak Perfect! Thanks for the quick... 08-13-2008, 09:21 AM
  1. #1
    Registered User
    Join Date
    08-05-2008
    Location
    Canada
    Posts
    15

    a button to shade and insert text

    Hi,

    I am trying to create a simply macro for a button on a spreadsheet I am currently working on.

    When clicked I would like the following to occur:

    1) Shade the current selected cell (Gray -25%)
    2) Insert the text "Verified" (Arial 9 - centered in the cell)

    Would anyone know how to create a macro for this?

    Thanks,

    sjak

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Use the macro recorder to get the code

    http://www.excel-it.com/record_macro.htm

    Use something like

      With Selection
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlBottom
            .Value = "Verified"
            .Interior.ColorIndex = 15
        End With
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    08-05-2008
    Location
    Canada
    Posts
    15
    Perfect! Thanks for the quick response.

    sjak

+ 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