How do we open a file for both reading and writing in VB? In VC++, we have a mode "r+" which will allow us to open a file for both reading and writing. I the same way, do can we open a file for both reading and writing ?
Thanks
Printable View
How do we open a file for both reading and writing in VB? In VC++, we have a mode "r+" which will allow us to open a file for both reading and writing. I the same way, do can we open a file for both reading and writing ?
Thanks
Open pathname For mode [Access access] [lock] As [#]filenumber [Len=reclength]
where
access : Read, Write, Read Write
BTW this is described in MSDN/VB help files
Using Access Mode, you can open file for read/write, for example:
Open "filename.txt" For Append Access Read Write As #1 --> a+
Open "filename.txt" For Input Access Read Write As #1 --> w+
Good Luck!