페이지 트리

버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.






VBA 코드



코드 블럭
languagevb
themeMidnight
titleExample
linenumberstrue
'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


'---------------------------------------------------------------------------------

...


'---------------------------------------------------------------------------------