VBA Error... (Doesn't understand Chr Function!!!)

VBA Error... (Doesn't understand Chr Function!!!)

Anonymous
Not applicable
962 Views
4 Replies
Message 1 of 5

VBA Error... (Doesn't understand Chr Function!!!)

Anonymous
Not applicable
I created a VBA App in AutoCAD 2000i...
When I went to distribute the App to the end users (running AutoCAD Release
14.01)
I tried to run the App in AutoCAD 14.01
It highlights the first instance of the "Chr" Function it comes accross and
gives me the error
"Can't Find Project or Labrary" (See attachment)
when I click OK it gives me the "References" dialog box with
2 refernces missing... Both only reference the path to where the project is
saved.
I have no way of telling what actual reference is missing.

All I know is that is I try to type something like
?Chr(100)
in the immediate window
it gives me the same error... (It should return the letter "d")

What's going on???
TIA

Thomas Smith
0 Likes
963 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
It has to do with differences in VBA DLL versions. To resolve this, just
prefix all occurences of the Chr() function with "VBA." as in VBA.Chr(104)).
Of course, you will have to do the same with a bunch of other functions,
like conversion functions, those who deal with strings, etc.

I'm a bit confused about the missing references (EDITED) but this will ensure
your app will work properly on all workstations.

Michel Rochon.


"Thomas Smith" a écrit dans le message news:
41B2DD65EB72D9108D6AB3D22941FCCC@in.WebX.maYIadrTaRb...
> I created a VBA App in AutoCAD 2000i...
> When I went to distribute the App to the end users (running AutoCAD
Release
> 14.01)
> I tried to run the App in AutoCAD 14.01
> It highlights the first instance of the "Chr" Function it comes accross
and
> gives me the error
> "Can't Find Project or Labrary" (See attachment)
> when I click OK it gives me the "References" dialog box with
> 2 refernces missing... Both only reference the path to where the project
is
> saved.
> I have no way of telling what actual reference is missing.
>
> All I know is that is I try to type something like
> ?Chr(100)
> in the immediate window
> it gives me the same error... (It should return the letter "d")
>
> What's going on???
> TIA
>
> Thomas Smith
>
>


----------------------------------------------------------------------------
----
0 Likes
Message 3 of 5

Anonymous
Not applicable
I had exactly the same thing happen when I tried to roll out some custom utilities. I discovered that msiprint.ocx was missing from the c:\program files\common files\microsoft shared\msinfo directory on the workstations where CHR caused errors (also MID and various other string handling commands). Copying it in and registering it solved the problems. Clive.
0 Likes
Message 4 of 5

Anonymous
Not applicable
>Copying it (msiprint.ocx)  and registering
it solved the problems.

 

I can cover the copying it part...

How do I register it???

 

Thomas Smith


style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
I
had exactly the same thing happen when I tried to roll out some custom
utilities. I discovered that msiprint.ocx was missing from the c:\program
files\common files\microsoft shared\msinfo directory on the workstations where
CHR caused errors (also MID and various other string handling commands).
Copying it in and registering it solved the problems.
Clive.
0 Likes
Message 5 of 5

Anonymous
Not applicable
 

in command prompt : regsvr32 ocxfile or regsvr32 dllfile

if You want to unregister use /u option

 

lukas

 

 



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
>Copying it (msiprint.ocx)  and
registering it solved the problems.

 

I can cover the copying it part...

How do I register it???

 

Thomas Smith


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
had exactly the same thing happen when I tried to roll out some custom
utilities. I discovered that msiprint.ocx was missing from the c:\program
files\common files\microsoft shared\msinfo directory on the workstations
where CHR caused errors (also MID and various other string handling
commands). Copying it in and registering it solved the problems.
Clive.
0 Likes