W10 x64 Pro SK, Office 2019 Pro x64 SK - makro funguje.
Ako bolo napísané, to nieje funkcia s návratovou hodnotou - teda má to byť procedúra sub.
Je v liste alebo v module?
Volá sa z listu alebo z mobulu?
Alebo je v PERSONAL.XLSB?
Čo má vstupovať ako parameter, string alebo Range?
Určite by som vynechal Select...
Príloha by bodla.
Sub doubleLine(aktRange As Range)
With aktRange
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
With .Borders(xlEdgeLeft)
.LineStyle = xlDouble
.Weight = xlThick
End With
With .Borders(xlEdgeTop)
.LineStyle = xlDouble
.Weight = xlThick
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
End With
With .Borders(xlEdgeRight)
.LineStyle = xlDouble
.Weight = xlThick
End With
End With
End Sub
Sub pokus()
doubleLine Worksheets("Hárok1").Range("B3:D10")
End Subcitovat