ich habs mal noch n bisschen entwirrt^^
Sub FOrmauswahlnachlinks()
Dim IntColumn As Integer
Dim IntRow As Integer
Dim Intzeilenprob As Integer
For IntRow = 1 To 30
For IntColumn = 2 To 26
zeilenprob = 0
Do Until zeilenprob < 26
zeilenprob = zeilenprob + 1
If Cells(IntRow, IntColumn).Interior.ColorIndex = 4 And Cells(IntRow, IntColumn - 1).Interior.ColorIndex = 2 And
Cells(IntRow + 1,IntColumn - 1).Interior.ColorIndex = 2 And Cells(IntRow + 2, IntColumn - 1).Interior.ColorIndex = 2 And
Cells(IntRow + 3, IntColumn - 1).Interior.ColorIndex = 2 Then
sgl_FormAllgemeinbestimmung = 2
Select Case sgl_FormAllgemeinbestimmung
Case Is = 1: nachlinksQUADRAT (form)
Case Is = 2: Senkrechte_nach_Links_verschieben
End Select
Exit Sub
End If
If Cells(IntRow, IntColumn).Interior.ColorIndex = 3 Then
sgl_FormAllgemeinbestimmung = 1
Select Case sgl_FormAllgemeinbestimmung
Case Is = 1: nachlinksQUADRAT (form)
Case Is = 2: Senkrechte_nach_Links_verschieben
End Select
Exit Sub
End If
Next
Next
End Sub
|