VBA 코드
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
'sample code |
...
'--------------------------------------------------------------------------------- |
...
'--------------------------------------------------------------------------------- |
...
Sub export_xlsx() |
...
Dim ws As Worksheet Dim savePath As String Dim mxmodule As Object Set mxmodule = Application.COMAddIns.Item("iMATRIX.ExcelModule").Object |
...
mxmodule.xapi.Property.BeforeSaveEnableEvent = |
...
True mxmodule.xapi.Property.IsRunning = |
...
False mxmodule.xapi.Property.IsPrintPreview = |
...
False mxmodule.xapi.Property.DisplayAlert = |
...
True Dim Calctimeout Calctimeout = mxmodule.xapi.Property.CalculatorTimeout |
...
mxmodule.xapi.Property.CalculatorTimeout = "-1" |
...
Dim ret ret = mxmodule.xapi.ExportFileEx(1, "", "", |
...
True) If ret = 1 Then MsgBox "열기" ElseIf ret = 2 Then MsgBox "저장" ElseIf ret = 3 Then MsgBox "취소" End If mxmodule.xapi.Property.BeforeSaveEnableEvent = |
...
True mxmodule.xapi.Property.IsRunning = |
...
False mxmodule.xapi.Property.IsPrintPreview = |
...
False mxmodule.xapi.Property.DisplayAlert = |
...
True Set mxmodule = Nothing End Sub '--------------------------------------------------------------------------------- |
...
'--------------------------------------------------------------------------------- |