Agreed. The only times I would make it visible immediately would be when debugging and testing in the command window.
>Yes, that would help, if an unknowing person tried it. Plus, unless the routine is short, I normally don't put in the
Visible=.T. statement until
after the routine is finished (unless I'm testing it). Otherwise, with intense automation, the process can really s-l-o-w down, due to screen refreshes (even in the background).
>---Michael
>
>>Your welcome Michael. Just for the record, the example was missing one line:
>>
>>oXL=createobject('excel.application')
>>oXL.visible = .t.
>>
oXL.Workbooks.Add>>oXL.Range("A6").Select
>>oXL.ActiveWindow.SelectedSheets.HPageBreaks.Add(oXL.ActiveCell)
kenweber
GCom2 Solutions
Microsoft Certified Professional