
Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Hi
Dim arrayAsatser() As String
Dim ovk As String
Dim ydd As String
ydd = Mid$(arrayAsatser(ovk, 4, 1), 1, 2)
and the error msg is "type mismatch"
thx
> Hi,
>
> step through the code in single step mode [F8],
> and show us where an error occurs and what error.
>
> And what is in the definition section of the code.
Helmut Weber - 07 Sep 2005 14:57 GMT
Hi jj,
I wonder, whether the very code you've posted, worked in Word 97,
as far as I know there is now way, to address an Element in an array
be it 3-dimensional or not,
by (String [, number [, number]]):
Dim ovk As String
arrayAsatser(ovk, 4, 1) ?
Gets me a type mismatch in Word 97, too.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Edward Thrashcort - 07 Sep 2005 17:45 GMT
I can replicate your problem ONLY if the value of ovk does not evaluate to
an integer. I assume that the arrayAsatser() is "Redimmed" somwhere?
Sub testit()
Dim arrayAsatser(9, 9, 9) As String
Dim ovk As String
Dim ydd As String
'This works OK (surprisingly)
ovk = "3"
arrayAsatser(ovk, 4, 1) = 98765
MsgBox Mid$(arrayAsatser(ovk, 4, 1), 1, 2)
'This produces a 'Type Mismatch Error'
ovk = "Three"
arrayAsatser(ovk, 4, 1) = 12345
MsgBox Mid$(arrayAsatser(ovk, 4, 1), 1, 2)
End Sub
Eddie
> Hi
>
[quoted text clipped - 13 lines]
> >
> > And what is in the definition section of the code.