Results 1 to 3 of 3

Thread: Type(?)

  1. #1
    Stiletto
    Guest

    Type(?)

    In what case can i use the Type statment and how can i use it?
    I have 3 strings that i need a function to search in a string...
    Can i put them under Type? like this:
    VB Code:
    1. Public Type Tags
    2.     ert1 As String
    3.     ert2 As String
    4.     PNM As String
    5. End Type
    6. Dim Tag as Tags
    I'm not sure, but i think this code declairs a var called Tag as Tags (value options are the ert1, ert2, PNM)
    Is that right?

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I don't think you understand what a Type variable is. Or I'm not getting at all what you're saying. Check this example.

    VB Code:
    1. Private Type UsrData
    2.     Dim sName As String
    3.     Dim sLastName As String
    4.     Dim iAge As Integer
    5. End Type
    6.  
    7. Private usr as UsrData
    8.  
    9. Private Sub ShowData()
    10.     Debug.Print "Name: " & usr.sName
    11.     Debug.Print "Last Name: " & usr.sLastName
    12.     Debug.Print "Age: " & usr.iAge
    13.  
    14. End Sub
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  3. #3
    Stiletto
    Guest
    Got it. Tnx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width