Thanks. Will give it a swirl.
>I am running this code to start a progress bar before my scan-insert process. I have to run it in two places for two seperate types of files. They could run at the same time and they could not. so would like to check to see if the object has already been created
>
>oProgBar = CREATEOBJECT('ProgBar')
>oProgBar.SetTitle('SPORTMA')
>oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing the main records from the data file....')
>oProgBar.SetRange(0, oVar.TempCount - 1)
>oProgBar.Show()
>
>once process number 1 is complete, then i want to start on process number two but if the progress bar is already created, then I want to just change the verbaige in the SetMessage line as well as teh set range (b/c record count could be different) and obvisouly the show:
>
>oProgBar.SetTitle('SPORTMA')
>oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing records from subordinate data file....')
>oProgBar.SetRange(0, oVar.TempCount - 1)
>oProgBar.Show()
Try the following
IF VARTYPE(oProgBar) != "O"
oProgBar = CREATEOBJECT('ProgBar')
oProgBar.SetTitle('SPORTMA')
ENDIF
oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing records from subordinate data file....')
oProgBar.SetRange(0, oVar.TempCount - 1)
oProgBar.Show()
Thanks in Advance.
J. Turner