Ciao ragazzi,
come avete ben capito dal messaggio, utilizzo un metodo di Stampa particolare per stampare "su misura" le text box, ma è la prima volta che mi capita un errore di questo tipo:
"Privista Matrice!"
L'errore si focalizza su questo codice che in teoria servirebbe per andare accapo nelle text Multiline:
Private Function GetLineFromString(strText As String, NumLinea As Long) As String
Dim Inizio As Long
Dim strTemp As String
Dim strLine As String
strTemp = strText
For Inizio = 0 To NumLinea
strLine = ""
'estrae la linea di testo carattere per carattere
Do Until (Left(strTemp, 1) = vbCr) Or (Len(strTemp) = 0)
strLine = strLine & Left(strTemp, 1)
strTemp = Right(strTemp, Len(strTemp) - 1)
Loop
If Inizio = NumLinea Then
GetLineFromString = Trim(strLine)
Else
If Len(strTemp) <> 0 Then
'elimina il carattere accapo (carriage return)
If Left(strTemp, 1) = vbCr Then strTemp = Right(strTemp, Len(strTemp) - 1)
End If
If Len(strTemp) <> 0 Then
'elimina eventualmente il carattere line feed (vbLf)
If Left(strTemp, 1) = vbLf Then strTemp = Right(strTemp, Len(strTemp) - 1)
End If
strTemp = Trim(strTemp)
End If
Next Inizio
End Function
Spero di essermi fatto capire, Claudio