Code: Alles auswählen.
** Excel-Makro
* Columns("H:L").Select
* Selection.Locked = False
* Selection.FormulaHidden = False
* Columns("A:G").Select
* ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
* geschützte Spalten
CALL METHOD OF
excel
'RANGE' = item
EXPORTING
#1 = 'A1'
#2 = 'G999'.
SET PROPERTY OF item 'Locked' = 1 .
* eingabebereite Spalten
CALL METHOD OF
excel
'RANGE' = item
EXPORTING
#1 = 'H1'
#2 = 'L999'.
SET PROPERTY OF item 'Locked' = 0 .
* Blatt schützen
CALL METHOD OF
sheet
'PROTECT'
EXPORTING
#01 = ''
#02 = 1
#03 = 1
#04 = 1.
Code: Alles auswählen.
...
get property of excel 'ActiveSheet' = sheet.
call method of sheet 'Protect'.
...