+ Reply to Thread
Results 1 to 6 of 6

Adding "All Borders" with a User Form (Similar to Data Form)

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    18

    Adding "All Borders" with a User Form (Similar to Data Form)

    I was hoping to add this function to my user form. I know that the Excel pre-built Data Form can copy down cell formatting, including cell borders, when inserting a new row (if everything is wrapped in all borders, the new line will have all borders as well). I would like to add that sort of feature to my User Form. I have seen coding that is supposed to add borders to used cells, etc., but I can't seem to get anything to work. I have attached the coding of my User Form as a reference, but I am not sure how much help that will be.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Adding "All Borders" with a User Form (Similar to Data Form)

    Not tested.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-22-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Adding "All Borders" with a User Form (Similar to Data Form)

    It gave me the following error
    "Compile Error: Invalid or unqualified Reference"

    and highlighted
    .Range
    from
    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Adding "All Borders" with a User Form (Similar to Data Form)

    Maybe ...

    Please Login or Register  to view this content.
    Last edited by shg; 06-26-2012 at 01:10 PM.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Adding "All Borders" with a User Form (Similar to Data Form)

    @shg
    Wasn't aware one could do this in one fell swoop...thanks for adding to my toolbox
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Registered User
    Join Date
    06-22-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Adding "All Borders" with a User Form (Similar to Data Form)

    Works like a charm!

    One last question, is there a way to extend the borders to the other filled cells in the row without overwritting the formula's in those cells? I guess I could include the formulas into the vba and have it write everything, but i am not very good with that.

    I have information in Cells A:O, but only fill B:H with the User Form.

    Any thoughts?

+ 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