Hi all,,,,,,,,,

Plzzzzzzz help me with the vb code to create n number of files with specific size.

I have a code which would create text/word/excel files .....But I tried this code to create 'n' number of files....

To be clear.....I need to create 1000 txt files with the content as 'Hello World1' 'Hello word2'.............'Hello World1000' respectively..........

And If i specify the size of the file in a text box then it should create the file with that size.....

But I couldn't make it...................help me this out..........

The following is the code ........

Public Sub veeru()

Const FILENAME = "C:\Users\veeru\Desktop\myfile.xls"

Dim My_filenumber As Integer

My_filenumber = FreeFile

Open FILENAME For Output As #My_filenumber

Write #My_filenumber, "Hello"

Close #My_filenumber End Sub