Results 1 to 5 of 5

Long Calculation Loop Upon Update

Threaded View

  1. #1
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Long Calculation Loop Upon Update

    Hi Everyone;

    My current task is to create a spreadsheet that will auto-hide/show rows based upon values in other cells. I am currently about halfway 40% complete with this aspect of the file. I've read over many forums, and the best what that I've seen individuals do it on other sample spreadsheets posted were a =Rand() in a random cell somewhere in the sheet, and a Private Sub worksheet_calculate()

    I'm far from a VBA expert. I'm trying to learn as I go along. Here is my current VBA:

    Private Sub worksheet_calculate()
    
    Dim Personnel As Integer, ACCT As Integer, SCOPE As Integer
    
    Personnel = Worksheets("Creation").Range("F6:F6").Value + 12
    
    Sheets("Creation").Rows("13:21").EntireRow.Hidden = True
    Sheets("Creation").Rows("13:" & Auditors).EntireRow.Hidden = False
    
    If Range("H6").Value <> "AMI" Then
        Sheets("Creation").Rows("23:25").EntireRow.Hidden = False
        Sheets("Creation").Range("B23").Value = Sheets("Creation").Range("H6").Value & " - Worksheet"
    Else
        Sheets("Creation").Rows("23:49").EntireRow.Hidden = True
    End If
        
    
    End Sub
    It was only when I added the
    Sheets("Creation").Range("B23").Value = Sheets("Creation").Range("H6").Value & " - Worksheet"
    clause that it began to do a 5 second long update process upon any cell value changing.

    I'm looking for how to set my VBA code to automatically update Hidden and unhidden fields, but without this 3 second updating calculation pause. Any help/advice?
    Last edited by Miraun; 09-02-2009 at 03:12 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1