Imports NetOffice.OfficeApi.Enums

Imports NetOffice.ExcelApi
Imports NetOffice.ExcelApi.Enums

' This module contains <global> shortcuts to the Application members.
Public Module GlobalHelper
    Property Application As Application

    Function Round(arg1 As Double, arg2 As Double) As Double
        Return Application.WorksheetFunction.Round(arg1, arg2)
    End Function

    ReadOnly Property Range(cell1 As Object, Optional cell2 As Object = Nothing)
        Get
            Return Application.get_Range(cell1, cell2)
        End Get
    End Property

    ReadOnly Property ActiveCell As Range
        Get
            Return Application.ActiveCell
        End Get
    End Property

    ReadOnly Property ActiveSheet As Worksheet
        Get
            Return Application.ActiveSheet
        End Get
    End Property

    ReadOnly Property ActiveChart As Chart
        Get
            Return Application.ActiveChart
        End Get
    End Property

    ReadOnly Property Selection As Object
        Get
            Return Application.Selection
        End Get
    End Property

    Public Const xlUp As XlDirection = XlDirection.xlUp
    Public Const xlDown As XlDirection = XlDirection.xlDown
    Public Const xlToLeft As XlDirection = XlDirection.xlToLeft
    Public Const xlToRight As XlDirection = XlDirection.xlToRight

    Public Const msoTrue As MsoTriState = MsoTriState.msoTrue
    Public Const msoThemeColorText1 As MsoThemeColorIndex = MsoThemeColorIndex.msoThemeColorText1

End Module
