Retrieves the specified styles information.
EssVGetStyle (sheetName, styleType, dimName, item) ByVal sheetName As Variant ByVal styleType As Variant ByVal dimName As Variant ByVal item As Long
sheetName is the text name of the worksheet to perform the action. sheetName is of the form "[Book.xls]Sheet". If sheetName is Null or Empty, the active worksheet is used.
styleType specifies the style setting you want to get.
dimName is the dimension name if styleType is 0; otherwise set this parameter to Null.
item is the style you want to get.
Table 13 lists foreground and background colors.
Returns text, number, or boolean indicating the state of the requested option. If an error occurs, #VALUE! is returned. If styleItem is not between 1 and 10, #NUM! is returned.
This example gets the style for child members that is set to italic.
Declare Function EssVGetStyle Lib "ESSEXCLN.XLL" (ByVal sheetName As Variant, ByVal styleType As Variant, ByVal dimName As Variant, ByVal item As Long) As Variant
Sub GetStyle()
Dim X As String
X=EssVGetStyle("[Book2.xls]Sheet1", 1,Empty,5)
If X="#NUM!" Then
MsgBox("Invalid item ID specified.")
Else
If X="#VALUE!" Then
MsgBox("Error. Option could not be found.")
Else
MsgBox("Get style is set to " + X)
End If
End If
End Sub