-
type-declaration character does not match declared data type
I am getting compiler error "type-declaration character does not match declared data type" . It's highlighting Left$
LVGetItemText = Left$(objItem.Text, nRet)
Derclarations are as below.
Private Type LV_ITEM
Mask As Long
Index As Long
SubItem As Long
State As Long
StateMask As Long
Text As String
TextMax As Long
Icon As Long
Param As Long
Indent As Long
End Type
Public Function LVGetItemText(lParam As Long, hwnd As Long) As String
Dim objItem As LV_ITEM
Dim nRet As Long
'some code
If nRet Then
LVGetItemText = Left$(objItem.Text, nRet)
End If
exit function
-
Right click on Left$ and select "Definition". It should open the Object Browser and select the Left$ method of the VBA.Strings Module. If not, it is possible that you have Left defined someplace else in your code (or another library is overloading it)
Marco
"There are two ways to write error-free programs. Only the third one works."
Unknown
-
Yes it is not opening the object browser.
Now i m using VBA.Left$ and it's working fine.
Thks for the help.
-
Thanks
Hehe i know this post is pretty old, but just wanna say thanks for posting your solution of vba.left$
I just had the exact same problem as you, so thx for ur solution.
-
Yeah, thank you for your solution guys!
-
Do you have the proper VBA references set in your project?
Similar Threads
-
By DH in forum VB Classic
Replies: 2
Last Post: 08-08-2007, 07:03 AM
-
Replies: 0
Last Post: 10-11-2002, 10:52 AM
-
By Shawn August in forum Mobile
Replies: 0
Last Post: 04-10-2002, 01:44 PM
-
By Tim Frost in forum xml.announcements
Replies: 0
Last Post: 04-02-2001, 10:53 AM
-
By Sirichai in forum VB Classic
Replies: 2
Last Post: 12-28-2000, 09:40 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|