回覆列表
  • 1 # 使用者1605103610676

    需要一個常駐記憶體的程序來監控函式的莫個變數去觸發輸出陣列。網上找的的程式碼

    執行auto_open, 然後任意單元格輸入 =X(10)

    Dim R As Range

    Dim dtNext As Date

    Sub Auto_Open()

    StartProcess

    End Sub

    Sub Auto_Close()

    StopProcess

    End Sub

    Function X(Size As Integer)

    Set R = Application.Caller.Offset(1, 1).Resize(Size, Size)

    X = 1

    End Function

    Sub FillRange()

    If Not R Is Nothing Then

    R.Value = R.Rows.Count

    Set R = Nothing

    End If

    "StartProcess

    End Sub

    Sub StartProcess()

    dtNext = Now + TimeValue("0:0:2")

    Application.OnTime dtNext, "FillRange"

    End Sub

    Sub StopProcess()

    Application.OnTime dtNext, "FillRange", schedule:=False

    End Sub

  • 中秋節和大豐收的關聯?
  • 考會計初級職稱有用嗎?