Domino 9 und frühere Versionen > ND6: Entwicklung
Dynamisches Array
brathaenchen:
Hmm irgendwie haut das nicht hin. Bekommen
bei ReDim Preserve myNames(anzahl) ein subscrit ot of range??
Glombi:
Tipp doch bitte mal ein paar Codezeile mehr ein.
Andreas
Thomas Schulte:
Ja irgendwie fehlt da ein bischen was. der erste Dim zum Bleistift. Und der Typ auch.
brathaenchen:
Also hier kommt der Code:
Dim collection2 As NotesDocumentCollection
Dim currentResponse As NotesDocument
Set collection2 = doc.Responses
Dim number As Long
number = 1
Dim csv As CSVFile
Dim st_Fields() As String
ReDim Preserve st_Fields(collection2.count)
Set currentResponse = collection2.GetFirstDocument ()
While Not currentResponse Is Nothing
st_Fields(number) = currentResponse.CSVField(0)
number = number + 1
Set currentResponse = collection2.GetNextDocument ( currentResponse )
Wend
Axel:
Hi,
wenn du das so machst, dann brauchst du kein Preserve.
Dim st_Fields() As String
ReDim st_Fields(collection2.count)
Set currentResponse = collection2.GetFirstDocument ()
While Not currentResponse Is Nothing
st_Fields(number) = currentResponse.CSVField(0)
number = number + 1
Set currentResponse = collection2.GetNextDocument ( currentResponse )
Wend
Axel
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln