Zeilenumbruch in Ausgabebox
MsgBox "Zeile 1" & vbCrLf & "Zeile2", vbExclamation
Eingabebox
Invoice_Nr = Application.InputBox("Pease enter the invoice number")
JA / NEIN Abfrage
z = MsgBox("Rohdaten-Update speichern?", 36, "Save Datafile")
Rückgabewert für Ja: z=6
Eine Bestätigungsbox kurz anzeigen
objShell.PopUp [Text], [Anzeigedauer sec], "OK"
Set objShell = Nothing
Sicherheitsabfragen unterdrücken
Application.DisplayAlerts = False
Automatische Kalkulation aus/an:
Calculation = xlManual / xlAutomatic
Drucken:
ActiveSheet.PrintOut (copies:=2)
Zellen Formatieren:
Range("A"& j - 1).EntireRow.Font.Bold = True
Selection.Interior.ColorIndex = 33
.Pattern = xlSolid
Columns("C").entirecolumn.autofit (Breite automatisch anpassen)
Makro darf geschützte Zellen ändern:
With Sheets("Tabelle1")
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, Password:="xxx", userinterfaceonly:=True
End With