case moneymachine of //Set Variables for the moneymachine
1:
begin
ProgressBar:=ProgressBar1;
lbltime:=lbltime1;
end;
end;
The code can step through this case without ProgressBar being defined. If it's not defined, then the AV you describe will occur.
Two choices:
case moneymachine of //Set Variables for the moneymachine
1:
begin
ProgressBar:=ProgressBar1;
lbltime:=lbltime1;
end;
else
Progressbar:=Progressbar2; // or something!
end;
Or
...
If Progressbar<>Nil Then
ProgressBar.Position:=ProgressBar.Min;
In all honesty, both should be performed.