Results 1 to 8 of 8

Thread: Auto Calculation Toolbar Button

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Contributor Richie(UK)'s Avatar
    Joined
    May 2004
    Location
    UK
    Posts
    188
    Location
    Another one to consider ...

    Sub CalcMode()
        Static iCalcMode As Integer
        Dim iMode As Integer, strText As String
    iCalcMode = iCalcMode Mod 3 + 1
        'cycle through the references
    Select Case iCalcMode
        Case 1: iMode = xlCalculationAutomatic: strText = "Auto"
        Case 2: iMode = xlCalculationManual: strText = "Manual"
        Case 3: iMode = xlCalculationSemiautomatic: strText = "Semi-auto"
        End Select
        'determine mode to apply
    Application.Calculation = iMode
        MsgBox strText
        'or whatever indicator you want
    End Sub
    Last edited by Aussiebear; 04-29-2023 at 10:37 PM. Reason: Adjusted the code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •