VBA InsertIndent 1
15.09.2015 16:45:07
Roffel89
ich würde gerne eine Einrückung vornehmen, aber weiß nicht wie ich es in VBA umsetzen muss.
Ich will, dass er mir die Namen, die er im Tabellenblatt Summary in Zeile 15 Spalte 4 um eines nach rechts rückt :
Sheets("Summary").Cells(15, 4).Value = Sheets(sheet).Cells(currentRow, 1).Value
Anscheinend geht das mit dem Befehl: InsertIndent 1
Aber wie muss ich Ihn hier einbauen?
Bitte um Hilfe.
Beste Grüße
Function checkList(sheet As String, caseColumn As Integer, Optional label As String = "") As _
Integer
Dim currentRow As Long
Dim counter As Integer
'Checking List
For currentRow = Sheets(sheet).Cells.SpecialCells(xlLastCell).Column To 2 Step -1
If (Sheets(sheet).Cells(currentRow, caseColumn).Value = "True" Or _
Sheets(sheet).Cells(currentRow, caseColumn).Value = "Wahr") Then
Call newLineAndFormat
Sheets("Summary").Cells(15, 4).Value = Sheets(sheet).Cells(currentRow, 1).Value
counter = counter + 1
End If
Next currentRow
'Summary row
Call newLineAndFormat
Sheets("Summary").Cells(15, 4).Value = label
Sheets("Summary").Cells(15, 5).Value = counter
Sheets("Summary").Activate
checkList = counter
End Function