4381
VB and the development of wizards / Re: Read value from file and put it to a DRO...
« on: March 29, 2011, 01:23:48 PM »
Try something like this:
FilePath = "C:\DRO.txt" 'Put the full path here
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.getfile(FilePath)
Set DROfile = f.OpenAsTextStream(1)
DROValue = CDbl(DROfile.readline)
DROfile.Close
SetOEMDRO(*********, DROValue)
FilePath = "C:\DRO.txt" 'Put the full path here
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.getfile(FilePath)
Set DROfile = f.OpenAsTextStream(1)
DROValue = CDbl(DROfile.readline)
DROfile.Close
SetOEMDRO(*********, DROValue)