Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a similar statement as "If Application.CutCopyMode 0 Then
Exit Sub" that I can use in a worksheet change event to allow the inserting of rows? (the program freezes) I pressume that the problem occurs due to the fact that the program 'finds it difficult' to establish the TARGET cell. So maybe a way to eliminate this parameter?? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi KobusD,
It might help if you posted the problematic code. --- Regards, Norman "KobusD" wrote in message ups.com... Is there a similar statement as "If Application.CutCopyMode 0 Then Exit Sub" that I can use in a worksheet change event to allow the inserting of rows? (the program freezes) I pressume that the problem occurs due to the fact that the program 'finds it difficult' to establish the TARGET cell. So maybe a way to eliminate this parameter?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the reply, Norman. Here is the code:
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
Can't hide/unhide rows under worksheet change event? | Excel Programming | |||
Inserting Rows during a SheetChange event | Excel Programming | |||
Worksheet is no longer the active sheet Event | Excel Programming |