Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Arrays von Steuerelementen

Empfohlene Antworten

Veröffentlicht

Weiß jemand ob man innerhalb von VBA Arrays von Steuerelementen anlegen kann? Wenn ja, wie.

Bei .NET ist dies möglich.

DANKE

was willst du denn machen? :confused:

Wenn ich Steuerelemente in nen Array übernehme, kann ich diese dann per schleife dynamisch auslesen und erzeugen.

        Load Text1(lngIndex)

Text1(lngIndex).Top = Text1(0).Top
Text1(lngIndex).Left = Text1(0).Left + Text1(0).Width * (lngIndex) + 90 * (lngIndex)
Text1(lngIndex).Text = "Text1(" & Tri***(lngIndex) & ")"
Text1(lngIndex).Visible = True[/PHP]

... das ist zum laden eines neuen elements...

[PHP] Unload Text1(lngIndex)

und das zum wegwerfen ;)

text1 ist ein element auf der form, das schon existiert...

getestet unter VB6, sollte aber auch unter VBA tun

Das nützt Dir aber nur was, wenn Du die Controls schon hast.

Mit dem Quellcode erstellst du dynamisch neue Textboxen unter VB:


Private WithEvents btnObj As VB.TextBox

Public Sub CreateTextBox(Width As Integer, Caption As String, top, left As Integer, Visible As Boolean)
Set btnObj = Controls.Add("vb.TextBox", "btnObj")
With btnObj
.Width = Width
.Text = Caption
.top = top
.left = left
.Visible = Visible
End With
End Sub

Private Sub Form_Load()
CreateTextBox 600, "Test", 300, 300, True
End Sub
[/PHP]

In VBA sind dynamische Generierungen von solchen Objekten eigentlich nicht möglich. Ich habe dennoch etwas gefunden, was Dir weiter helfen wird:

http://mypage.bluewin.ch/reprobst/WordFAQ/UFDyna.htm#UFDyna10

Danke. Der Link hat meine Fragen beantwortet.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.