I need a little help with using a Function
I have put this in a module:
And trying to get the values here:Code:Public Function FontInfo() Application.Dialogs(xlDialogFontProperties).Show Worksheets("Sheet1").Range("AC1").Select EmailForm.TextBox3.Font.name = Selection.Font.name EmailForm.TextBox3.Font.size = Selection.Font.size EmailForm.TextBox3.Font.Bold = Selection.Font.Bold EmailForm.TextBox3.Font.Italic = Selection.Font.Italic EmailForm.TextBox3.ForeColor = Selection.Font.ColorIndex Dim Fcolor As Integer, fsize As String, fstyle As String Fcolor = Selection.Font.ColorIndex fsize = Selection.Font.size fstyle = Selection.Font.name End Function
Private Sub CommandButton4_Click()
Dim c As Integer, s As Integer, n As String
c = FontInfo(Fcolor)
s = FontInfo(fsize)
n = FontInfo(fname)
MsgBox Str(s)
MsgBox Str(s)
MsgBox (n)
End Sub
The come up empty
Can someone show me what I am doing wrong?


Reply With Quote

