Sub Code_erstellen()
Dim inZeile As Integer
Dim inZaehler As Integer
Application.DisplayAlerts = False
Sheets.Add
ActiveSheet.Move After:=Sheets(Sheets.Count)
With ThisWorkbook.VBProject.vbComponents(ActiveSheet.Name).CodeModule
If .CountOfLines = 0 Then
.InsertLines 1, "Option Explicit"
.InsertLines 3, "Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)"
.InsertLines 4, " ActiveSheet.ScrollArea = ""A1:K30"""
.InsertLines 5, "End Sub"
Else
.InsertLines inZeile + 3, "Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)"
.InsertLines inZeile + 4, " ActiveSheet.ScrollArea = ""A1:K30"""
.InsertLines inZeile + 5, "End Sub"
End If
End With
Application.DisplayAlerts = True
End Sub
Makros - zweiten Drucker als Symbol in die Symbolleiste einfügen
Mikoop 24.11.2006 - 4092 Hits - 1 Antwort
Makro erstellen für Kommentar einfügen
Stefan_calc 17.01.2007 - 90 Hits - 3 Antworten
kann wegen makro nicht drucken - was machen?
srepsac 26.06.2007 - 118 Hits - 1 Antwort
Brauche Tipps für einen individuellen VBA-Code
varginator 03.04.2008 - 118 Hits - 14 Antworten