[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Monitoring Excel varabiles

nicknewton

10/23/2007 6:50:00 PM

I am trying to monitor a cell in excel, however when the value of this
cell changes it stops the programs and gives an error. I would like to
know if there is a better way to do this so I can check it on every
scan.

While images==true
PLCV=parameters.range('b8')['value']

if PLCV==Trigger
now=Time.now
hour=now.hour
min=now.min
sec=now.sec
day=now.day
month=now.month
year=now.year
dest="#{StoredImgDir}\\#{month}-#{day}-#{year}
#{hour};#{min};#{sec}"
Dir.mkdir(dest)

Dir.chdir(LogDir)
T=File.new("Log.txt", "a")
T.puts "There was a jam at #{now}"
end

if PLCV=Trigger
Dir.chdir("#{FTPDir}")
sleep(recordpostbuffer)
dir2=Dir.new("#{FTPDir}")
dir2.each do|file|
copy= true

if file=="."
copy=false
end

if file==".."
copy=false
end

if copy==true
FileUtils.copy(file,"#{dest}")
end

end
dir1=Dir.new(FTPDir)
dir1.each do |file|
ft=File.atime(FTPDir)
now=Time.now
nd=false

if file == "."
nd=true
end

if file ==".."
nd=true
end

if nd==false
File.new("#{file}", "w+").close
File.delete("#{file}")
end
end

end

end

1 Answer

nicknewton

10/23/2007 8:25:00 PM

0

I have found out that it will only crash the program if the cell that
is being monitored is active. Is there away to tell if the cell is
active from a coding stand point?