Return to index: [Subject] [Thread] [Date] [Author]

RE: Visual Basic question

[Subject Prev][Subject Next][Thread Prev][Thread Next]
Please see my comments below.
-----Original Message-----
From: Greg Smith [mailto:strusup(--nospam--at)]
Sent: Monday, May 14, 2001 7:06 AM
To: seaint
Subject: Visual Basic question

Anyone on the list that knows Visual Basic 6.......What is wrong with the following code?  (The change of bases works fine but the Print is where I'm getting a runtime error).
Dim AA, BB, CC, Rythm As Double
Dim i As Integer 
Option Base set starting array dimension from 1 not the default 0
Option Base 1
Private Sub cmdExit1_Click()
End Sub
Private Sub cmdCompute_Click() 
Try to use if i=0 then option base will not default i to 1 
If i = 1 Then
Open CmnDialog1.BasesData For Output As #1
Else: i = i + 1
End If
AA = Num1.Text
BB = Newbase.Text
Rythm = Log(AA) / Log(BB)
CC = 10# ^ Rythm
Newnum.Text = CC
If Check1.Value Then
Print #1, Num1.Text; Newbase.Text; Newnum.Text
Else: Close #1
End If
End Sub
TIA,  Greg