-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathEXCEL_CHART_GRID_LIBR.bas
executable file
·52 lines (46 loc) · 1.89 KB
/
EXCEL_CHART_GRID_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_GRID_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 : CHART_GRID_FUNC
'DESCRIPTION :
'LIBRARY : EXCEL_CHART
'GROUP : GRID
'ID : 001
'AUTHOR : RAFAEL NICOLAS FERMIN COTA
'************************************************************************************
'************************************************************************************
Function EXCEL_CHART_GRID_FUNC(ByRef CHART_OBJ As Excel.Chart)
On Error GoTo ERROR_LABEL
EXCEL_CHART_GRID_FUNC = False
With CHART_OBJ
With .Axes(xlCategory)
.HasMajorGridlines = True
' .HasMinorGridlines = True
End With
With .Axes(xlCategory).MajorGridlines.Border
.ColorIndex = 1
.WEIGHT = xlHairline
.LineStyle = xlDot
End With
With .Axes(xlValue)
.HasMajorGridlines = True
' .HasMinorGridlines = True
End With
With .Axes(xlValue).MajorGridlines.Border
.ColorIndex = 1
.WEIGHT = xlHairline
.LineStyle = xlDot
End With
End With
EXCEL_CHART_GRID_FUNC = True
Exit Function
ERROR_LABEL:
EXCEL_CHART_GRID_FUNC = False
End Function