Microsoft.VisualBasic NameSpace Not Being Recognized in Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I have a utility program that has a form that allows a user to select a file.
I'm then using the LEFT Function to get some information.
sNewFilePathName = Left(sFilePathName, iCnt)
I'm getting this following error message when I compile:
C:\VB.NET\AppendCRLF\AppendCRLF\Form1.vb(106): 'Public Property Left() As
Integer' has no parameters and its return type cannot be indexed.

When I use the following I don't get the error message:
sNewFilePathName = Microsoft.VisualBasic.Left(sFilePathName, iCnt)

I'm confused. I shouldn't have to use "Microsoft.VisualBasic" as when I
checked the properties for the solution, I see Microsoft.VisualBasic as a
project import under the "Imports" section.

Any suggestions?

TIA,
Rita
 
Hi Rita,

The form has a public property 'left': Gets or sets the x-coordinate of a
control's left edge in pixels. You app supposed the at left in your code
referred to that, which is why you need the full namespace reference.

HTH,

Bernie Yaeger
 
Thanks Bernie. I suspected that as I have another project that does not use a
form in which I use the Left function with no problem.
 
Back
Top