How to use hadoop for text file?

How can you use a variable as a text file name in visual basic?

  • When i press a button in visual basic it creates a variable, i would like to use that variable as the name of a text file, is this possible?

  • Answer:

    You can use a string variable to hold the file name . The path and name of the file can be hard coded, assigned from a textbox.text property or can be determind by the use of a dialog box which allows the user to browse to a specific file. dim dlg as new OpenFileDialog dim sPath as string with dlg . filter = "All Files (*.*)|*.*|Text File (*.txt)|*.txt" if .showdialog = cancel then exit sub else sPath = .filename end if

Joe at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Why can't you just Dim the variable and create the text file on two separate lines of code? You're going to give yourself a monstrous headache if you have to refer to that file by way of regular expressions from that point forward.

Mr. Goldsmith

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.