none
how to create a text file (VBA 2013) RRS feed

  • Question

  • Hi, 

    What I have:

    - a form where user can fill in some textboxes, click on a button and add those text to a listbox (several times);

    - a button to wrote all the above text in a file (fis.txt);

    - can delete the text from the form and write another lines.

    What I want:

    1- click on a radioButton which give me the possibility to create a new text file and the user to enter the file name (fis2.txt).

    Please help me with this issue.

    Thank you,

    Cristina

    Sunday, April 19, 2015 5:01 PM

All replies

  • Hi, 

    What I have:

    - a form where user can fill in some textboxes, click on a button and add those text to a listbox (several times);

    - a button to wrote all the above text in a file (fis.txt);

    - can delete the text from the form and write another lines.

    What I want:

    1- click on a radioButton which give me the possibility to create a new text file and the user to enter the file name (fis2.txt).

    Please help me with this issue.

    Thank you,

    Cristina



    • Edited by cristina503 Sunday, April 19, 2015 11:22 AM
    • Merged by Tina-Shi Monday, April 20, 2015 3:20 AM op post a same thread in our forum
    Sunday, April 19, 2015 10:01 AM
  • As it appears that you want to write text to a file using VBA, you should ask in the VBA forum, here:

    https://social.msdn.microsoft.com/Forums/en-US/isvvba/threads

    Sunday, April 19, 2015 2:13 PM
  • Thank you, I moved the message to the above link.
    Sunday, April 19, 2015 5:03 PM
  • You are asking a lot here.You also haven't even said VBA for which application? Word, Excel? Also what service pack.

    Try searching the internet for specific pieces of code and see how far you can get on your own. We are happy to help you with specific questions, but not to do a day or two of work for free. Whilst the above code may not take that long to write, it will take that long to get working for your users and with all the changes likely to be requested!

    Radio buttons are for selecting different options. Use command buttons to run specific tasks.


    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

    Sunday, April 19, 2015 11:43 PM
  • Hi Rod,

    I think I got carried away a bit with the first school project. Even my teacher said I have too many demands for the first theme. I already created and wrote in a text file (but with the path and name written in the code). I wanted a radio button to select something like this: write 'in the initial file' or write 'in a new file' (and give the path and a new name).

    Thanks for your response,

    Cristina

    Saturday, April 25, 2015 5:25 PM