Hello, I am pretty nice to UiPath and I was wondering if I can use the Invoke Code or anything else to change the format of the cells in my Excel file. (Fonts, Bold, Border, etc)
I set it up so it can bold and add the border to the last row and column. Because my code will create over 200 files and I need it to be in a specific format.
I really do want to avoid using Excel Application Scope btw. I want my code to work in the background.
Sub formatCell()
Dim ws As Worksheet: Set ws = ThisWorkbook.ActiveSheet
Dim lastRow As Long
lastRow = Cells(Rows.Count, 4).End(xlUp).Row
With ws.Range(ws.Cells(lastRow, 4), ws.Cells(lastRow, 10))
.Font.Bold = True
.Borders.LineStyle = xlContinuous
End With
End Sub
This is the code that I want to use. Is there any way to incorporate that in there?
Thank you.