Results 1 to 3 of 3

Thread: Passing filename to form

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    13

    Passing filename to form

    On the welcome page I have a button to open the file to read.

    With dlgOpenDialog
    .filter = "text(*.txt) |*.txt"
    .InitialDirectory = Application.StartupPath
    .ShowDialog()
    strAddress = .Filename

    End With

    I want to pass the file name/location to another form where I will read in the comma delemited data into an array.

    I have the new form as

    Public objAddressForm as New String and the objAddressForm.show

    The problem is when I try to pass strAddress it says "Too many arguments to "Public Sub Show()"

    How can I get this to work? I don't know what I am doing wrong.

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    Re: Passing filename to form

    Originally posted by Donovan

    I have the new form as

    Public objAddressForm as New String (should be Form) and the objAddressForm.show

    I couldnt just follow. Are you trying to pass a string that contains the path to the data file to a new form? be more precise please.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    13
    oops, it is actually:

    Public objAddressForm as New frmAddress

    and yes I am trying to pass a string that contains the path to the data file to a new form?

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