|
-
Sep 10th, 2001, 12:34 PM
#1
Thread Starter
Addicted Member
Error using Mid() function???
Hi,
When using the mid() function in MS Word 97 VBA I get the following error:
"Cannot find project or library"
Am i missing any project references?
Does anybody know how to write a mid() function?
Any ideas??
Thanks
-
Sep 10th, 2001, 12:40 PM
#2
Hyperactive Member
Mid(String, Start, Length), in VB 6.0 at least.
Mike
-
Sep 10th, 2001, 12:42 PM
#3
Thread Starter
Addicted Member
That is what I am using
Well, that is what I am doing Mid(String, Start, Length), except I am still receiving the same error???
-
Sep 10th, 2001, 12:48 PM
#4
Hyperactive Member
sText="this is a sample text"
myVariable = mid(sText, 6,2)
' myVariable will be "is"
u don't need any reference at all
-
Sep 10th, 2001, 12:52 PM
#5
Thread Starter
Addicted Member
Maybe it is another issue...
Well, the weird thing is, it works ok on my machine, however, on my colleague's maching he receives the error.
I didn't think it was the reference thing, so I guess it must be something else.
-
Sep 10th, 2001, 12:58 PM
#6
Hyperactive Member
i've checked the references word uses (standard references):
- Visual Basic for Applications
- Microsoft word 9.0 Object library
- ole automation
- normal
- microsoft office 9.0 object library
maybe you could check these? (! i'm using word 2000!)
-
Sep 10th, 2001, 01:00 PM
#7
reference it directly like this:
VBA.Mid$(String, Start, Length)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|