Re: Microsoft.VisualBasic.String.Left



Thanks for the info on the Symbol Search. I was using the Object Browser and
it seems they both pretty much return the same thing, so I guess I must have
been on the right track. I just have a hard time finding something useful
sometimes using these tools.

Anyway, regarding the SubString method. I typed in my variable,
txtVariable... and SubString did not appear in the listing. Again, I figured
I was missing an Imports and I added System.String as one option. Still it
did not work. Just as I was getting ready to tell you it does not work, I
realized I needed to do it this way. txtVariable.TEXT.SubString(x,y). Now it
works just as needed.

Thanks.

Thanks,
Greg

"Armin Zingler" wrote:

"Greg" <AccessVBAnet@xxxxxxxxxxxxxxxxx> schrieb
I have two questions with regards to the LEFT function.

I ran into a problem with the LEFT function today. I knew it was a
valid Function, but when I tried to use it, it was getting
interpreted as the LEFT location of a control or something like
that, instead of the LEFT function. (I want to extract the left
portion of a string). Anyway, I knew what I needed was to find out
what IMPORTS I was missing. After finding a posting on MSDN that
spoke about a similar issue, I realized I did not need an imports,
but I need to refer to it like Microsoft.VisualBasic.String.Left and
it worked fine. In fact, using Microsoft.VisualBasic.String as an
import did not allow me to use just the LEFT function by itself. I'm
assuming this si because there is already another LEFT defined.

Now my questions.

1. I assume there is a better way of doing this now with VB.Net 2005
since I need to reference it the way I did. Is there a different
command I should be using in VB.Net 2005 in place of the VB6 way of
doing it?


TheString.SubString(0, ...)

2. I know of a method/function I want to use. In this case, it was
LEFT. But, I don't know the namespace I need to include in my
Imports section. Knowing the command I want to use, how can I find
out what Imports I need to reference to use it?

Alt+F12 (or "symbol search" in Edit menu): "Left" <enter>


Armin

.



Relevant Pages

  • Re: newbie; Update not working
    ... If you were missing Imports statements, your code wouldn't compile at all. ... I think your problem has to do with your command object and its parameters. ... StudentID = @StudentID" ... Also why is there not just a Execute for a sql ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Microsoft.VisualBasic.String.Left
    ... needed was to find out what IMPORTS I was missing. ... but I need to refer to it like Microsoft.VisualBasic.String.Left and it ... need to reference it the way I did. ... Knowing the command I want to use, how can I find out what Imports I need ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Cross Module Command Useage
    ... command that needs to access a command that is in moduleB. ... python program for the commands. ... all the work is done -- later imports do ... in an impossible situation. ...
    (comp.lang.python)
  • BAT file to re-start in Safe Mode...?
    ... and then imports them to my ... indicating a problem with the command line text that does ... the BAT file in Safe Mode with Networking, ... then re-boot into full XP?" ...
    (microsoft.public.windowsxp.general)
  • RE: Saving Action Query Warnings
    ... If you need to do this, you will be reduced to a one at a time situation. ... Bulk imports and exports are just one command and there is no facility to ... with subsequent VBA examination of the ...
    (microsoft.public.access.modulesdaovba)