ransi : noch einmal "makro bedingung"
11.05.2005 22:09:40
martin
der code für die exel-tabelle funzt klasse .
Option Explicit
Dim wks As Worksheet
Private Sub Workbook_BeforeClose(Cancel As Boolean)
For Each wks In Worksheets
If wks.Name <> "Dummy" Then wks.Visible = xlSheetVeryHidden
Next
End Sub
Private Sub Workbook_Open()
If VBA.Environ("Computername") <> "triton1972" Then ThisWorkbook.Close False
For Each wks In Worksheets
wks.Visible = xlSheetVisible
Next
End Sub
habe ihn teilweise auch in ein word dokument eingebaut :
Option Explicit
Private Sub Document_Open()
If VBA.Environ("Computername") <> "triton1972" Then ThisDocument.Close False
End Sub
beibt das gleiche problem, wie bei excel, daß es bei deaktivierten makros nichts bringt .
hast du (oder irgendjemand andres) eine idee, wie man dieses problem bei word lösen kann .
der dokumentschutz nutzt nichts, weil ich einen serienbrief schützen möchte.
schönen dank fürs grübeln im voraus .
gruß , martin