• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VB Question (Resolved)

WhoIsThat

Senior member
Got this code somewhere, and I know it's valid code. However, it would not compile on my machine, saying class or project not found.

strX = Left$(strX, ilength - 1)
strY = RTrim$(strY)

All the references are correct and in place. I am quite certain of that.

Obviously, Left and RTrim are standard functions in VB 6, but with that "$" sign, VB doesn't seem to recognize the functions anymore. However, this usage is all over the place and I am sure it is not a mistake.

Any help would be appreciated. Thanks.


 
Click on the "Project" menu and then "References" menu. DO any of the items marked with a checkmark say "... not found..."?

VB gets wierded out sometimes when it can't resolve a project reference.

The "$" is an old school style for indicating the function will return a string.

Dave
 
Well, I have both VB .NET and VB 6. I also have .NET framework installed. MS explicitly say they can co-exist, and I am positive that the code source of this person also has both installed. (Unfortunately, I am unable to ask that person).

Somebody I was talking to just mentioned to me that "left$" is the same as "left" except it is much faster with restrictions on data type.

If anyone knows the answer, please post. I will also let everyone know if I find out anything.

Thanks.
 
Originally posted by: Apathetic
Click on the "Project" menu and then "References" menu. DO any of the items marked with a checkmark say "... not found..."?

VB gets wierded out sometimes when it can't resolve a project reference.

The "$" is an old school style for indicating the function will return a string.

Dave

Nothing is missing. If all else faills, I will just remove all the "$"s, though I am trying not to change the code at this point.
 
Originally posted by: WhoIsThat
Well, I have both VB .NET and VB 6. I also have .NET framework installed. MS explicitly say they can co-exist, and I am positive that the code source of this person also has both installed. (Unfortunately, I am unable to ask that person).

Somebody I was talking to just mentioned to me that "left$" is the same as "left" except it is much faster with restrictions on data type.

If anyone knows the answer, please post. I will also let everyone know if I find out anything.

Thanks.
Well, when you went to compile were you running in the VB6 IDE or the VB.Net IDE? That fact that you have both installed won't let you create .Net code in VB6 or vice versa.

But yes, a quick trip to online help / MSDN library / MSDN website will tell you that left and left$ are both (string, length).
 

The VB problem was resolved. It turned out it had nothing to do with VB at all. I had one of the needed third-party DLLs, but did not go through the full installation process for that program (a zip program) and so after I installed the zip program, all the problems magically went away. 🙂

Thanks!!

 
Originally posted by: WhoIsThat
The VB problem was resolved. It turned out it had nothing to do with VB at all. I had one of the needed third-party DLLs, but did not go through the full installation process for that program (a zip program) and so after I installed the zip program, all the problems magically went away. 🙂

Thanks!!

No problem. I thought it was something like that and I was hoping the offending ActiveX control would show up under the references section as "missing".

Dave
 
Back
Top