E
Eddy Stan
Hi
sub Banlisting() ' given 2 lines of my macro
Instead of the following two lines, can there be a UDF to center, bold, like
given below
sh1.Cells(rw, 6) = cell.Offset(0, 10) ' Date
sh1.Cells(rw, 6).HorizontalAlignment = xlCenter
sh1.Cells(rw, 6).Font.Bold = True
Is it possible:
CenterAndBold(sh1.Cells(rw, 6)) = cell.Offset(0, 10) ' Date
end sub
Function CenterAndBold(somevalue) ' number, string or date
With Selection
.HorizontalAlignment = xlCenter
.font.bold = True
End With
End Function
sub Banlisting() ' given 2 lines of my macro
Instead of the following two lines, can there be a UDF to center, bold, like
given below
sh1.Cells(rw, 6) = cell.Offset(0, 10) ' Date
sh1.Cells(rw, 6).HorizontalAlignment = xlCenter
sh1.Cells(rw, 6).Font.Bold = True
Is it possible:
CenterAndBold(sh1.Cells(rw, 6)) = cell.Offset(0, 10) ' Date
end sub
Function CenterAndBold(somevalue) ' number, string or date
With Selection
.HorizontalAlignment = xlCenter
.font.bold = True
End With
End Function