-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEXCEL_CHART_TITLE_LIBR.bas
executable file
·55 lines (44 loc) · 1.9 KB
/
EXCEL_CHART_TITLE_LIBR.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Attribute VB_Name = "EXCEL_CHART_TITLE_LIBR"
'--------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------
Option Explicit 'Requires that all variables to be declared explicitly.
Option Base 1 'The "Option Base" statement allows to specify 0 or 1 as the
'default first index of arrays.
'--------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------
'************************************************************************************
'************************************************************************************
'FUNCTION : EXCEL_CHART_TITLE_FUNC
'DESCRIPTION : SETUP CHART TITLE
'LIBRARY : EXCEL_CHART
'GROUP : TITLE
'ID : 001
'AUTHOR : RAFAEL NICOLAS FERMIN COTA
'************************************************************************************
'************************************************************************************
Function EXCEL_CHART_TITLE_FUNC(ByRef CHART_OBJ As Excel.ChartObject, _
ByVal TITLE_STR As String)
On Error GoTo ERROR_LABEL
EXCEL_CHART_TITLE_FUNC = False
With CHART_OBJ.Chart
.HasTitle = True
.ChartTitle.Characters.Text = TITLE_STR
With .ChartTitle.Font
.name = "Helvetica-Narrow"
.FontStyle = "Bold"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
End With
EXCEL_CHART_TITLE_FUNC = True
Exit Function
ERROR_LABEL:
EXCEL_CHART_TITLE_FUNC = False
End Function