Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi !
Can you help me create a simple VB code that would make all my listbox objects show the lock/unlock icon.
Here you have an example for Lock Fields and Unlock them
sub Ventas
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
ActiveDocument.Fields("Tipo").Select "3"
ActiveDocument.Fields("Tipo").Lock
end sub
sub Compras
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
ActiveDocument.Fields("Tipo").Select "13"
ActiveDocument.Fields("Tipo").Lock
end sub
Sub BorrarSeleciones
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
end sub
sub Evolucion
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
ActiveDocument.Fields("Year").Select "2014"
end sub
sub H_Ventas
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
ActiveDocument.ActivateSheet 1
ActiveDocument.Fields("Tipo").Select "3"
ActiveDocument.Fields("Tipo").Lock
end sub
sub H_Compras
ActiveDocument.UnlockAll
ActiveDocument.ClearAll(true)
ActiveDocument.ActivateSheet 2
ActiveDocument.Fields("Tipo").Select "13"
ActiveDocument.Fields("Tipo").Lock
end sub
thanks for the quick help but i need a specific macro that would change all listbox properties, that would change the checkbox property at the caption tab then special Icons lock/unlock "checkbox enable"
thanks for the quick help but i need a specific macro that would change all listbox properties, that would change the checkbox property at the caption tab then special Icons lock/unlock "
Hi
Have you considered using a style rather than a macro for that?
You can create a style that sets the caption bar options for list boxes only, select all the objects on a sheet and apply the style. You will have to do that on each sheet though, but it is easier to apply to multiple models than a macro.
HTH
Jonathan