특정 동작설정 기능을 VBA 코드로 실행 합니다.
Syntax
Public Function ExecuteAction ( actionName As String, param1 As object, param2 As object, param3 As object, param4 As object, param5 As object, param6 As object, ) As Long
Parameters
actionName |
---|
Type: String
실행할 동작설정 명
Name | 동작명 |
---|---|
HyperLink | HyperLink 동작 (보고서 팝업, 시트 이동에 사용) |
Clear | Clear 동작 |
CopyPaste | 복사 붙여넣기 |
param1~6 |
---|
Type: object
동작설정에 필요한 매개변수
ActionName | param1 | param2 | param3 | param4 | param5 | param6 |
---|---|---|---|---|---|---|
HyperLink | ReportCode <string> | SheetCode <string> | Left <int> | Top <int> | Width <int> | Height <int> |
Clear | Range <string> | |||||
CopyPaste | From <string> | To <string> | CopyValue <bool> | CopyFormat <bool> |
Return Value
Type: object
동작설정의 결과 값
Example
Sub HyperLinkActionTest() Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").Object '지정된 영역 지우기 (Clear action) ret = mxmodule.xapi.ExecuteAction("HyperLink", "REP23C43B503AC84352BE3260E25D5FF658", "", 0, 0, 1024, 768) If ret <> False Then mxmodule.xapi.MessageBox "Error " & mxmodule.xapi.LastErrorMessage, vbInformation, "i-MATRIX" End If End Sub Sub ClearActionTest() Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").Object '지정된 영역 지우기 (Clear action) ret = mxmodule.xapi.ExecuteAction("Clear", "A1:D1") If ret <> False Then mxmodule.xapi.MessageBox "Error " & mxmodule.xapi.LastErrorMessage, vbInformation, "i-MATRIX" End If End Sub Sub CopyPasteActionTest() Set mxmodule = Application.COMAddIns.Item("iMATRIX6.ExcelModule").Object '값 복사 (CopyPaste action) ret = mxmodule.xapi.ExecuteAction("CopyPaste", "A1:D6", "F1", True, True) If ret <> False Then mxmodule.xapi.MessageBox "Error " & mxmodule.xapi.LastErrorMessage, vbInformation, "i-MATRIX" End If End Sub