+ Reply to Thread
Results 1 to 5 of 5

Macro To Create Border Around Multiple Cells

  1. #1
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Question Macro To Create Border Around Multiple Cells

    Hi Everyone,

    I am trying to create a macro that will create a border around multiple cells in a single row. Below is the macro I created. I got it to partially work before adding the Else statement, but it still reflected an error in line prior to the Else statement. I'm hoping this is a quick and easy fix, and that it doesn't mean I have to rewrite the macro. I'm hoping that someone might be able to tell me why it won't work as written. I can add an example workbook if necessary to help see what's going on.

    HTML Code: 
    I appreciate any help that I can get on this. So, thank you in advance for your help.

    Matt

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Macro To Create Border Around Multiple Cells

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Re: Macro To Create Border Around Multiple Cells

    Porucha vevrku,

    Thank you for your help. The code you wrote did add the border when a "topped" item is selected from my pull-down menu; however, it doesn't remove the border when I select a product that isn't topped. How do I modify the code to accomplish this? I did try the Else line below, which was unsuccessful.

    HTML Code: 
    Thank you, again, for your help.

    Matt

  4. #4
    Registered User
    Join Date
    05-14-2020
    Location
    Washington State
    MS-Off Ver
    2016
    Posts
    61

    Re: Macro To Create Border Around Multiple Cells

    Porucha vevrku,

    I managed to figure out how to delete the border by changing the Else line to the following:

    HTML Code: 
    This seemed to do the trick. Thanks for all your help.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Macro To Create Border Around Multiple Cells

    Try:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro | Create border under certain rows
    By Thanks4helping in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-23-2016, 09:44 AM
  2. Replies: 2
    Last Post: 01-08-2016, 11:44 PM
  3. Create Border/ shift cells down around repeating value
    By alepak in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2012, 11:46 AM
  4. How to create multiple directories from cells using a macro or VBA
    By riskmgr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 10:16 AM
  5. Need macro to add thick box border to certain cells - THANKS FOR THE HELP!!!
    By Jeff M in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2011, 09:57 AM
  6. Put border around cells that contain data (multiple sheeets)
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-15-2011, 04:01 AM
  7. create a thin border around the selected cells
    By Chandra Lee in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-24-2006, 08:55 AM

Tags for this Thread

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