B
Bill
We are trying to format the result of a custom function. Is this possible.
The code below does not do this. Here we are trying to format the letters
"cde" in the "test" function below using Macro1
Function test() As String
Application.Volatile
test = "abcdefgh"
End Function
Sub Macro1()
On Error GoTo iErrors
With ActiveCell.Characters(Start:=3, Length:=3).Font
.Name = "Calibri"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.Color = -16776961
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Exit Sub
iErrors:
Err.Clear
End Sub
Thanks in advance
The code below does not do this. Here we are trying to format the letters
"cde" in the "test" function below using Macro1
Function test() As String
Application.Volatile
test = "abcdefgh"
End Function
Sub Macro1()
On Error GoTo iErrors
With ActiveCell.Characters(Start:=3, Length:=3).Font
.Name = "Calibri"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.Color = -16776961
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Exit Sub
iErrors:
Err.Clear
End Sub
Thanks in advance