TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: J French
date: 2004-12-06 09:52:00
subject: Re: Declaring variables a

On Mon, 6 Dec 2004 11:49:27 +0100, "Stefanie" 
wrote:

>Steve,
>
>Thats the same as writing data to the file using Put, right ?
>

I could not see your first post

Below is a demo of Random Access using UDTs containing variable length
strings - the Record Length that it is opened with has to be large
enough. 
- I would not do it like this personally

Option Explicit

Private Type TRec
   L As Long
   S As String
   I As Integer
End Type

Private Sub Command1_Click()
   Dim Rec As TRec, Channel%
   
   Rec.L = -1
   Rec.S = "Test String"
   Rec.I = -1
   
   Channel = FreeFile
   Open App.Path + "\test.dat" For Random As Channel Len = 200
   Put #Channel, 1, Rec
   Close #Channel

End Sub

Private Sub Command2_Click()
   Dim Rec As TRec, Channel%
      
   Channel = FreeFile
   Open App.Path + "\test.dat" For Random As Channel Len = 200
   Get #Channel, 1, Rec
   Close #Channel
   Me.Print Rec.L, Rec.S, Rec.I

End Sub
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 12/6/04 9:52:43 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.