+ Reply to Thread
Results 1 to 10 of 10

Format a row when user hits enter

  1. #1
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Exclamation Format a row when user hits enter

    Hello All, I'd like to have a use fill out a table and when then get to the last column and hit enter it returns to first column and formats the row the way I need it to be. That is border set, cells merged, alignment and font set. See the attachment. I'm also kinda new to Excel VB so I really need an explicit instructions/code. So look at the attachment for visual explanation of what I want to do and the spreadsheet itself.

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Format a row when user hits enter

    Will the previous line be completely filled in before they hit enter?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Format a row when user hits enter

    Hello, no because, of example the last column is a Hand Rubber Stamp that goes into the box after the inspector as completed each dimension inspection.

    By the way, thank you for responding, I really really appreciate the help
    Jill

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Format a row when user hits enter

    This is not entirely elegant but you can try:
    Please Login or Register  to view this content.
    I didn't not test the .Font line because I do not have that font. You might have to alter it to match the font you have. This code would require that columns A-W be complete before it will add a new line.
    Last edited by Solus Rankin; 12-17-2013 at 01:59 PM.

  5. #5
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Format a row when user hits enter

    Wow, let me give this a go. In the meantime - thank you for the help!!! You're the best! Will get back to you

  6. #6
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Format a row when user hits enter

    Okay so I need a bit more guidance. I go into Developer, Visual Basic or Macros. Just a bit more info on what to do with the code provided.

  7. #7
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Format a row when user hits enter

    Right click on the tab of sheet you want it to effect and select 'View Code'. Paste the code above into the module that appears.

    You can then test it by filling out the last row and pressing enter.

  8. #8
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Format a row when user hits enter

    Holy crap, Batman... this is great!!! Okay so I just have to make adjustments to border size and one merge. So what am I looking at? Where to modify the border weights and merge of cells
    Attached Images Attached Images

  9. #9
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Format a row when user hits enter

    Please Login or Register  to view this content.
    The first red line needs to be changed from U to V. I apparently had a typo. The second line will adjust the thickness of the border if you change the value (currently 4).

  10. #10
    Forum Contributor
    Join Date
    10-09-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    119

    Exclamation Re: Format a row when user hits enter

    Hello Solus

    You helped me a little while back with adding rows to my sheet using VB script. Is there a way to
    add exactly 30 lines so that I get a full next page each time. I don't want pages with only a few formatted lines

    The people who will be using this need to have it "dummy" proof.

    See current form page. The VB script works fine just want to see if it can be tweeked a bit.

    Jill
    Attached Images Attached Images

+ 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. Detect if user hits cancel from user input type box
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-20-2011, 11:42 AM
  2. Replies: 2
    Last Post: 08-07-2011, 03:49 PM
  3. Forcing User to Enter Certain Format
    By BrianFawcett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2011, 05:24 PM
  4. [SOLVED] Avoid user having to enter hours when using [mm]:ss format
    By Lady_luck in forum Excel General
    Replies: 3
    Last Post: 01-04-2005, 07:06 AM
  5. [SOLVED] Avoid user having to enter 00 hours when using [mm]:ss format
    By Lady Luck in forum Excel General
    Replies: 4
    Last Post: 01-02-2005, 03:06 PM

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