+ Reply to Thread
Results 1 to 6 of 6

Formatting outline of cells

Hybrid View

welchs101 Formatting outline of cells 12-18-2008, 08:31 AM
MickG Hi, Perhaps something like... 12-18-2008, 09:11 AM
welchs101 Gives an error 12-18-2008, 09:15 AM
welchs101 this works 12-18-2008, 09:26 AM
welchs101 does not work 12-18-2008, 10:46 AM
welchs101 Here is the fix i found 12-18-2008, 10:58 AM
  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Formatting outline of cells

    I have the following code to copy and paste from one workbook/sheet to another. Once i paste the value to the sheet i want to "underline" the entire row .......... any ideas?

    Workbooks(Roster_InputFilename).Worksheets(Roster_InputFile_Sheet).Range(add_row & ":" & add_row).Copy _
        Destination:=Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row)

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650
    Hi, Perhaps something like this:-
    With Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row).Borders(xlBottom)
    .LineStyle = xlContinuous
    .Weight = xlThick
    .ColorIndex = 1
    End With
    Regards Mick

  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Gives an error

    something like this is exactly what i am looking for

    BUT

    This code gives me an error.............

  4. #4
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    this works

    I took the previous posters suggestion and this is what i came up with

    Workbooks(Roster_InputFilename).Worksheets(Roster_InputFile_Sheet).Range(add_row & ":" & add_row).Copy _
        Destination:=Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row)
        
    Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row).Select
            With Selection.Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
            End With

    Is this the best way?

  5. #5
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    does not work

    Apparently the code i thought worked..........DOES NOT.

    It works as long as the sheet is selected that i want to underline a row in. If a different sheet is selected prior to using the code then the ".select" has n error.

    can any one help?

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Here is the fix i found

    Here is the fix i found.........i think this works:

    Workbooks(Roster_InputFilename).Worksheets(Roster_InputFile_Sheet).Range(add_row & ":" & add_row).Copy _
        Destination:=Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row)
        
    Application.Goto Workbooks(Gradebook_Filename).Worksheets(Gradebook_Sht_Nm_Roster).Range(Rster_lst_row & ":" & Rster_lst_row)
            With Selection.Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
            End With

+ 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