bertholdmaes
Nieuwe gebruiker
- Lid geworden
- 9 jul 2007
- Berichten
- 2
Hallo,
Ik heb een vraagje omtrent een word formulier.
Ik heb in mijn formulier een button nodig die een extra rij toevoegd in mijn formulier.
Dit was me gelukt met volgende code op een button te plaatsen:
Visual Basic code:
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/17/2008 by Bertel'
Selection.InsertRowsBelow 1
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
End Sub
Maar eenmaal ik mijn formulier LOCK(protect) dan weigert hij de macro uit te voeren. Heeft iemand er een idee van hoe ik dmv VBcode een formulier kan UNLOCKEN in het begin van de macro en terug LOCKEN op het eind van de macro?
Alvast bedankt!!!
Bertel
Ik heb een vraagje omtrent een word formulier.
Ik heb in mijn formulier een button nodig die een extra rij toevoegd in mijn formulier.
Dit was me gelukt met volgende code op een button te plaatsen:
Visual Basic code:
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 4/17/2008 by Bertel'
Selection.InsertRowsBelow 1
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
Selection.MoveRight Unit:=wdCell
Selection.FormFields.Add Range:=Selection.Range, Type:= _
wdFieldFormTextInput
End Sub
Maar eenmaal ik mijn formulier LOCK(protect) dan weigert hij de macro uit te voeren. Heeft iemand er een idee van hoe ik dmv VBcode een formulier kan UNLOCKEN in het begin van de macro en terug LOCKEN op het eind van de macro?
Alvast bedankt!!!
Bertel