Results 1 to 7 of 7

Thread: [RESOLVED] How do I use CommonDialog???

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Location
    Ngorno
    Posts
    70

    Resolved [RESOLVED] How do I use CommonDialog???

    Do I need to do something before I can use CommonDialog in my code.

    The below code doesn't work for me ... Error at CommonDialog

    VB Code:
    1. Private Sub MenuFile_Click(Index As Integer)
    2.  
    3. Select Case Index
    4.  
    5. Case 0 'Open
    6.  
    7. CommonDialog1.ShowOpen
    8.  
    9. Open CommonDialog1.FileName For Input As #1
    10.  
    11. Dim tmp() As String
    12. Dim Lines() As String
    13.  
    14. Lines = Split(Input(LOF(1), 1), vbCrLf)
    15. Close #1
    16. 'now you have each line in its own array element
    17. For x = 0 To UBound(Lines)
    18. tmp = Split(Replace(Lines(x), "//", ""), "/") 'This lines removes the // and then splits by /
    19. 'so now you have an array for the first line which is as follows
    20. 'tmp(0) = "Header1"
    21. 'tmp(1) = "info"
    22. 'tmp(2) = "moreinfo"
    23. 'tmp(3) = "yet some more"
    24. 'do what you need to
    25. Next
    26.  
    27. Case ...
    Last edited by Steff_DK; Sep 14th, 2005 at 01:47 PM. Reason: resolved

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