LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Change event causes program to freeze

When I insert rows on this sheet the program freezes. I managed to fix
the Copy & Paste with a solution provided by Tom Ogilvy in this NG. I
am a bit stuck with the inserting problem. Hope someone can help me:


Private Sub Worksheet_Change(ByVal Target As Range)


If Application.CutCopyMode 0 Then Exit Sub


'Turn calculation and screen updating off whilst the following code
executes
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False


'Unprotect the worksheet and disable the selection of locked cells
Worksheets("Output").Unprotect Password:="xxxxx"
Worksheets("Output(budgets)").Unprotect Password:="xxxxxx"


Worksheets("Budgets").CompileButt.BackColor = RGB(255, 0, 0)
Worksheets("Budgets").CompileButt.Caption = "Needs a Compile!"
Worksheets("Budgets").CompileButt.PrintObject = True


Worksheets("Output").Range("A2").Value = "A compile is outstanding!"
Worksheets("Output(budgets)").Range("F2").Value = "A compile is
outstanding!"


'Protect the worksheet and disable the selection of locked cells
Worksheets("Output").Protect Password:="xxxxx"
Worksheets("Output").EnableSelection = xlUnlockedCells
Worksheets("Output(budgets)").Protect Password:="xxxxxx"
Worksheets("Output(budgets)").EnableSelection = xlUnlockedCells

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event change freeze my workbook broogle Excel Programming 2 May 13th 05 11:19 AM
event management program Unigue eventer Excel Discussion (Misc queries) 1 April 2nd 05 09:01 PM
Change event and calculate event Antje Excel Programming 1 March 29th 05 09:03 PM
VBA password / Program Freeze Johann Excel Programming 1 May 10th 04 01:34 PM
VBA Password / Program freeze Johann Excel Programming 0 May 6th 04 11:01 PM


All times are GMT +1. The time now is 07:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"