hi
That’s what I won't to do with vba Code = "select on the toolbar, view, form
header and footer"
I'm making an addin that makes controls in to a form but not every form
starts off with a header/footer so to catch this I need to make one.
help?
Steve
Public Sub sbKnoppenAanmaken(FormulierNaam As String)
Dim intKnop As Integer
Dim strKnop(4, 5) As String
Dim objKnop As Object
Dim objfrm As New Access.Form
'De knoppen opslaan in een array
strKnop(0, 0) = "cmdNieuw": strKnop(0, 1) = "&Nieuw": strKnop(0, 2) =
fnkTwips(0.2): strKnop(0, 3) = fnkTwips(0.2): strKnop(0, 4) = fnkTwips(2):
strKnop(0, 5) = fnkTwips(0.7)
strKnop(1, 0) = "cmdOpslaan": strKnop(1, 1) = "&Opslaan": strKnop(1, 2) =
fnkTwips(2.2): strKnop(1, 3) = fnkTwips(0.2): strKnop(1, 4) = fnkTwips(2):
strKnop(1, 5) = fnkTwips(0.7)
strKnop(2, 0) = "cmdToevoegen": strKnop(2, 1) = "&Toevoegen": strKnop(2, 2)
= fnkTwips(4.2): strKnop(2, 3) = fnkTwips(0.2): strKnop(2, 4) = fnkTwips(2):
strKnop(2, 5) = fnkTwips(0.7)
strKnop(3, 0) = "cmdVerwijderen": strKnop(3, 1) = "&Verwijderen": strKnop(3,
2) = fnkTwips(6.2): strKnop(3, 3) = fnkTwips(0.2): strKnop(3, 4) =
fnkTwips(2): strKnop(3, 5) = fnkTwips(0.7)
strKnop(4, 0) = "cmdSluiten": strKnop(4, 1) = "&Sluiten": strKnop(4, 2) =
fnkTwips(8.2): strKnop(4, 3) = fnkTwips(0.2): strKnop(4, 4) = fnkTwips(2):
strKnop(4, 5) = fnkTwips(0.7)
!!!!!Checks if a header or footer exists otherwise make one!!!!!
code
'Na kijken of de knoppen al bestaan en zoniet ze aanmaken
For intKnop = 0 To 4
Set objKnop = CreateControl(FormulierNaam, acCommandButton, acFooter, ,
, strKnop(intKnop, 2), strKnop(intKnop, 3), strKnop(intKnop, 4),
strKnop(intKnop, 5))
objKnop.Name = strKnop(intKnop, 0)
objKnop.Caption = strKnop(intKnop, 1)
Next intKnop
DoCmd.Restore
Set objKnop = Nothing
End Sub
"Ofer" schreef:
> Then create the form header and footer, when you open it in design view,
> select on the toolbar, view, form header and footer, and now using the vba I
[quoted text clipped - 28 lines]
> > > > thanks
> > > > Steve