Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting a random access file 1

Status
Not open for further replies.

tweea

Computer
Joined
Mar 29, 2005
Messages
4
Location
BG
I want to start a Random access file for visual basic....but I dont know how to...

"I neva apologize 4 sayin what I feel, that would b like apologizing for being real"
 
Code:
Type Record   ' Define user-defined type.
   ID As Integer
   Name As String * 20
End Type

Dim MyRecord As Record
Dim MyFile as Long   ' Declare variables.
MyFile = Freefile    'get available file handle
Open "TESTFILE" For Random As MyFile Len = Len(MyRecord)
' Close before reopening in another mode.
Close MyFile

Courtesy of VBHelp



Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top