Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6 in xp functions not working

Status
Not open for further replies.

timotai

Technical User
Apr 13, 2002
119
0
0
GB
Hi all

This is strange and I can't see why it is happening, probably something stupid.

I have a VB project that Ive just started trying to use in XP (build in NT4). Functions such as String$, Date, Left$, right$, space$, etc will not work. It just keeps giving complie errors.

Does anyone know why

Thanks

Tim
 
Look under Project->References and see if there are any references marked "Missing:". If there are any that are missing, even ones that don't seem to afect the functions causing the compile errors, you will get this error. To fix it, find the required dlls for the missing references and install them.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Some have been replaced by coercive functions such as CStr, CDate, etc.
Maybe try using these instead?

The Microsoft mascot is a butterfly.
A butterfly is a bug.
Think about it....
 
Follow jebenson's advice


>use functions like "left", "right", et al

In which case you are getting variants rather than strings returned to you.

>Some have been replaced

Eh?
 
Most, if not all of the functions you mention are part of the 'vba' object. Try replacing the function call with vba. in front of it. For example,

vba.Left$(.....



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top