SmokinWrek
IS-IT--Management
Help! I'm getting this error on a Get statement, and I don't understand why. Here's the section of code that's giving me problems:
Dim Banner() As BannerRec
Dim NumRecs, Counter As Double
Dim BoxSize, NumBoxes, NumPerPage As Integer
Dim InputRec, BannerOut As String
Open txtInputFilename.Text For Random As #1 Len = InpRecLen
Open txtOutputFilename.Text For Random As #2 Len = InpRecLen
NumRecs = (LOF(1) / InpRecLen)
NumPerPage = Val(txtNumberPerPage.Text)
BoxSize = NumPerPage * 2000
NumBoxes = NumRecs \ BoxSize
ReDim Banner(1 To NumBoxes, 1 To 2, 1 To NumPerPage)
If NumRecs > BoxSize Then
For z = 1 To NumBoxes
For i = 1 To BoxSize
Get #1, (i + ((z - 1) * BoxSize)), InputRec
Counter = Counter + 1
Put #2, , InputRec
Next i
... code drifts off into spaghetti
It's probably something stupid I'm doing, but like I said, I get the "Run-time error '458' Variable uses an Automation type not supported in Visual Basic" on the Get statement. Can anyone point out my error?
Kevin
Dim Banner() As BannerRec
Dim NumRecs, Counter As Double
Dim BoxSize, NumBoxes, NumPerPage As Integer
Dim InputRec, BannerOut As String
Open txtInputFilename.Text For Random As #1 Len = InpRecLen
Open txtOutputFilename.Text For Random As #2 Len = InpRecLen
NumRecs = (LOF(1) / InpRecLen)
NumPerPage = Val(txtNumberPerPage.Text)
BoxSize = NumPerPage * 2000
NumBoxes = NumRecs \ BoxSize
ReDim Banner(1 To NumBoxes, 1 To 2, 1 To NumPerPage)
If NumRecs > BoxSize Then
For z = 1 To NumBoxes
For i = 1 To BoxSize
Get #1, (i + ((z - 1) * BoxSize)), InputRec
Counter = Counter + 1
Put #2, , InputRec
Next i
... code drifts off into spaghetti
It's probably something stupid I'm doing, but like I said, I get the "Run-time error '458' Variable uses an Automation type not supported in Visual Basic" on the Get statement. Can anyone point out my error?
Kevin