[RESOLVED] Visual Basic 6 - sequential files; downloading from disk (notepad)
Using the same command button i have code in there that sends data to disk (notepad) using sequential file's 'write' 'append' coding. Does anyone know if I can use the same command button to download the data from the notepad in order to plot the data chosen onto a bar chart?? I've tried but it hasn't worked for so far. I'm probably doing it wrong. If that isn't possible can someone please suggest how else I can do that.
Also, can I use 'input' to download the data from notepad? I'm just having problems retrieving the data to plot onto a bar chart.
Below is what I've done so far for sending data to disk (notepad)
Code:
intEndVolt = 10
For intIndex = 0 To 9
For intVolt = 1 To intEndVolt
intResist = Val(cboResist(intIndex).Text)
intlstResistor = Val(lstResistor(intIndex).Text)
If cboResist(intIndex).Visible = True And lstResistor(intIndex).Visible = True Then
'Power dissipated by each Resistor in Series
intCurrent = (intResist * intlstResistor / 1) * intVolt
intPower_Series = ((intCurrent ^ 2) * (intResist * intlstResistor))
'Power dissipated by each Resistor in Parallel
intPower_Parallel = (intVolt * intVolt) / (intResist * intlstResistor)
'Current Through each Parallel Resistor
intCurrent_Parallel = ((intResist * intlstResistor) / 1) * intVolt
'Voltage Across each Series Resistor
intTotalResistor = (intResist * intlstResistor) + (intResist * intlstResistor)
intVoltage_Series = (intTotalResistor / intVolt) * (intResist * intlstResistor)
'Writing the data above to disk
Write #1, intPower_Series, intPower_Parallel, intCurrent_Parallel, intVoltage_Series
End If
Next intVolt
Next intIndex
Close #1
thanks