PDA

Click to See Complete Forum and Search --> : creating a file


Hrishikesh
Sep 10th, 2000, 12:34 PM
Hello

can anyone tell me how to create a text file , read only and hidden in vb ?
please help ..

Sep 10th, 2000, 01:01 PM
This will create the file.

Open "MyFile" For Output As #1
'This line will write text to the file.
Print #1, "MyText"
Close #1


Now to set it as a hidden file, use the SetAttr function.

SetAttr "MyFile", vbHidden Or vbReadOnly

Hrishikesh
Sep 10th, 2000, 07:36 PM
thanks