blaksnm
Well-known Member
- Joined
- Dec 15, 2009
- Messages
- 554
- Office Version
- 365
- Platform
- Windows
Hi
I have a table with 7 x 5 rows, 6-10,12-16, 18-22, 24-28, 30-34, 36-40 and 42-46 (Total 35 rows)
For each row this procedure is made (example below is to row 46):
The procedure works fine on 34 rows (random pick), but not when I hardcode the 35th...
I am searching this forum for some guiding out of this problem - can anybody help me?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 2/26/2020 10:33:36 PM EST
'ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=False, AllowFormattingColumns:=True, AllowFormattingRows:=True
Application.ScreenUpdating = False
If Not Intersect(Target, Range("B46")) Is Nothing Then
Cancel = True
Range("B46").Value = Range("B4").Value + 1
Range("C46").Select
End If
If Not Intersect(Target, Range("C46")) Is Nothing Then
Cancel = True
Range("B46:B46").ClearContents
Range("B46").Value = Range("B4").Value + 1
Range("C46").Copy
Sheets("Fordeling").Range("FordelingKodeSubArea") = Sheets("Reg").Range("C46") 'value'PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ArbeidsArtListe
Range("E46").Value = Sheets("Fordeling").Range("FordelingKopiStart").Value
Range("E46").Select
Range("J46").Value = "Ferdig"
Range("L46").Value = Time
End If
If Not Intersect(Target, Range("J46")) Is Nothing Then
Cancel = True
Range("J46").Value = "Ferdig"
Range("M46").Value = Time
Range("M46").Select
End If
If Not Intersect(Target, Range("K46")) Is Nothing Then
Cancel = True
KjøreListeReg
End If
If Not Intersect(Target, Range("L46")) Is Nothing Then
Cancel = True
ActiveCell.Value = Time
Range("L46").Select
End If
If Not Intersect(Target, Range("M46")) Is Nothing Then
Cancel = True
ActiveCell.Value = Time
Range("M46").Select
End If
Application.ScreenUpdating = True
End Sub
I have a table with 7 x 5 rows, 6-10,12-16, 18-22, 24-28, 30-34, 36-40 and 42-46 (Total 35 rows)
For each row this procedure is made (example below is to row 46):
The procedure works fine on 34 rows (random pick), but not when I hardcode the 35th...
I am searching this forum for some guiding out of this problem - can anybody help me?
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'Modified 2/26/2020 10:33:36 PM EST
'ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=False, AllowFormattingColumns:=True, AllowFormattingRows:=True
Application.ScreenUpdating = False
If Not Intersect(Target, Range("B46")) Is Nothing Then
Cancel = True
Range("B46").Value = Range("B4").Value + 1
Range("C46").Select
End If
If Not Intersect(Target, Range("C46")) Is Nothing Then
Cancel = True
Range("B46:B46").ClearContents
Range("B46").Value = Range("B4").Value + 1
Range("C46").Copy
Sheets("Fordeling").Range("FordelingKodeSubArea") = Sheets("Reg").Range("C46") 'value'PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ArbeidsArtListe
Range("E46").Value = Sheets("Fordeling").Range("FordelingKopiStart").Value
Range("E46").Select
Range("J46").Value = "Ferdig"
Range("L46").Value = Time
End If
If Not Intersect(Target, Range("J46")) Is Nothing Then
Cancel = True
Range("J46").Value = "Ferdig"
Range("M46").Value = Time
Range("M46").Select
End If
If Not Intersect(Target, Range("K46")) Is Nothing Then
Cancel = True
KjøreListeReg
End If
If Not Intersect(Target, Range("L46")) Is Nothing Then
Cancel = True
ActiveCell.Value = Time
Range("L46").Select
End If
If Not Intersect(Target, Range("M46")) Is Nothing Then
Cancel = True
ActiveCell.Value = Time
Range("M46").Select
End If
Application.ScreenUpdating = True
End Sub