Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6062521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:03:43+00:00 2026-05-23T09:03:43+00:00

I have a task I am trying to complete, but cant think how to

  • 0

I have a task I am trying to complete, but cant think how to approach it.

Here is the example:

I have a text file with preferences in it. I read the file and find text on a particular line like this:

 If InStr(sLine, "avidDirectory") Then

This is my line in the text file:

 avidDirectory "S:\Avid MediaFiles\" "D:\Avid MediaFiles\" "Z:\Avid MediaFiles\"

What I need to do is read each string between the quoations marks and place each one in a text box.

I have 5 texts boxes to use if there are 5 different directories above (only three in the example above)

So I guess I need to capture the text between the quotation marks, create a new string from it, and place that string into a text box

ie;
string 1 = textbox1.txt
etc

How would I approach this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:03:43+00:00Added an answer on May 23, 2026 at 9:03 am

    Create a new Windows application and add a button and five text boxes to the form you will be started with and replace the code of the form with this code

    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim txt As String = "avidDirectory ""S:\Avid MediaFiles\"" ""D:\Avid MediaFiles\"" ""Z:\Avid MediaFiles\"""
            Dim insideAQuotation As Boolean = False
            Dim array(5) As String
            Dim currentString As Integer = 0
    
    
            For i = 1 To Len(txt)
                If Mid(txt, i, 1) = Chr(34) And insideAQuotation Then
                    insideAQuotation = False
                    currentString += 1
                ElseIf Mid(txt, i, 1) = Chr(34) And insideAQuotation = False Then
                    insideAQuotation = True
                End If
    
                If insideAQuotation Then
                    If Mid(txt, i, 1) <> Chr(34) Then    'This is to avoid the quotation marks inside the text boxes.
                        array(currentString) &= Mid(txt, i, 1)
                    End If
                End If
            Next
    
            Me.TextBox1.Text = array(0)
            Me.TextBox2.Text = array(1)
            Me.TextBox3.Text = array(2)
            Me.TextBox4.Text = array(3)
            Me.TextBox5.Text = array(4)
    
    
    
        End Sub
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to accomplish the following ridiculous task: I have a text file containing
Here's what I'm trying to do : I have an entity Task with a
I'm trying to do a simple task with jQuery: I have a list of
I am trying to call a batch file from an application, but I want
I have a task that might take a while to complete. I have tried
I'm total beginner in js and JQuery and have to complete such task: I
Here is what I am trying to do. I have a perl script that
Newbie Warning I have a simple but vexing problem trying to disable an NSButton.
I am trying to complete a seemingly simple task that has turned into a
I'm trying to query by iteration but our iteration names have special characters (e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.