myGully.com Boerse.SH - BOERSE.AM - BOERSE.IO - BOERSE.IM Boerse.BZ .TO Nachfolger
Zurück   myGully.com > Computer & Technik > Programmierung
Seite neu laden

VBA Array

Willkommen

myGully

Links

Forum

 
Antwort
 
Themen-Optionen Ansicht
Ungelesen 03.05.11, 17:09   #1
sivro
VB - VBA - Python
 
Benutzerbild von sivro
 
Registriert seit: Feb 2010
Beiträge: 29
Bedankt: 11
sivro ist noch neu hier! | 0 Respekt Punkte
Standard

Also da er ein zweidimensionales Array möchte wäre das wohl die bessere Lösung:

Code:
Option Explicit
Option Base 1

Private Sub zweidimensionales_Array()
Dim astrNamen() As String
Dim lngZeile As Long, lngLZ As Long
Dim intSpalte As Integer

lngLZ = Cells(Rows.Count, 1).End(xlUp).Row
ReDim astrNamen(lngLZ, 2)

For lngZeile = 1 To lngLZ
  For intSpalte = 1 To 2
    astrNamen(lngZeile, intSpalte) = Cells(lngZeile, intSpalte)
  Next intSpalte
Next lngZeile

For lngZeile = LBound(astrNamen) To UBound(astrNamen)
  MsgBox astrNamen(lngZeile, 1) & "   " & astrNamen(lngZeile, 2)
Next lngZeile

Erase astrNamen
End Sub
sivro ist offline   Mit Zitat antworten
Antwort


Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren

BB code is An
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:29 Uhr.


Sitemap

().