Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27101

VS 2008 left is not a member of VBA

$
0
0
In converting this VB6 program to VB.net I stumbled across this

Code:

Public Function FindParentWindow(ByVal TitleStart As String) As Long
        Dim hWndTmp
        Dim nRet
        Dim TitleTmp As String
        hWndTmp = FindWindow(vbNullString, vbNullString)
        Do Until hWndTmp = 0
            If GetParent(hWndTmp) = 0 Then
                TitleTmp = Space(256)
                nRet = GetWindowText(hWndTmp, TitleTmp, Len(TitleTmp))
                If nRet Then

                    TitleTmp = UCase(VBA.Left(TitleTmp, nRet))                 
  If InStr(TitleTmp, UCase(TitleStart)) Then
                        FindParentWindow = hWndTmp
                        Exit Do
                    End If
                End If
            End If
            hWndTmp = GetWindow(hWndTmp, GW_HWNDNEXT)
        Loop
    End Function

and saw Left is not a member of VBA. in error . now VBA should have a member that handles string types right ?

Viewing all articles
Browse latest Browse all 27101

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>