Kullanıcı
- Katılım
- 28 Tem 2022
- Mesajlar
- 120
- Excel Versiyonu
- Excel 2016
- Excel Sürümü
- 64 Bit
- Excel Dili
- Türkçe
Merhaba, Makro kodlamasında, iki aynı prosedürü birleştirip, sayfada kullanmak için yardımcı olursanız, memnun olurum.
(I)
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B4:B" & Rows.Count)) Is Nothing Then Exit Sub
If Cells(Target.Row, 2) <> "" Then
If Cells(Target.Row, 1) = "" Then Cells(Target.Row, 1) = WorksheetFunction.Max([A:A]) + 1
End If
End Sub
(I)
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [alan]) Is Nothing Then Exit Sub
If WorksheetFunction.Min([sonuc]) < 0 Then
MsgBox "Stoktaki miktardan fazla değer yazılamaz" & Chr(10) & "Kırmızı dolgulu alanlar stok aşımını göstermektedir"
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End Sub
(I)
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B4:B" & Rows.Count)) Is Nothing Then Exit Sub
If Cells(Target.Row, 2) <> "" Then
If Cells(Target.Row, 1) = "" Then Cells(Target.Row, 1) = WorksheetFunction.Max([A:A]) + 1
End If
End Sub
(I)
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [alan]) Is Nothing Then Exit Sub
If WorksheetFunction.Min([sonuc]) < 0 Then
MsgBox "Stoktaki miktardan fazla değer yazılamaz" & Chr(10) & "Kırmızı dolgulu alanlar stok aşımını göstermektedir"
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End Sub