| VBA-Beispiel 020 | |
|
|
|
Makro per Makro einfügen |
|
| Mit diesem Makro wird in Tabelle1 ein neues Makro eingefügt. | |
|
Sub Makro_einfuegen() 'fügt in die Tabelle Tabelle1 das Makro ein Dim x As Integer With ThisWorkbook.VBProject.VBComponents("Tabelle1").CodeModule x = .CreateEventProc("SelectionChange", "Worksheet") .InsertLines x + 1, "'dieses Makro wurde per Makro eingefügt" .InsertLines x + 2, "MsgBox ""Hallo, Hallo !!!""" End With End Sub |
|
|
Download: vba020.zip |
|
relevante Links:
|
|
| |