Thanks, that makes sense: I didn't have a problem with sheet 1, which was already selected. On the other hand, I still don't understand why I get the error on some sheets (after sheet 1), but not on all of them. Anyway, I will try it out when I am back at work tomorrow.
>
> This.oSheet.Activate
>
>> This.oSheet.Cells(tnRow, tnCol).Select()
>> This.oSheet.Pictures.Insert(tcFileName)
>>
>>This is repeated for many different sheets (the property .oSheet changes its value, according to the selected sheet). On some sheets, quite often on the the second sheet, but in general quite randomly, I get an error message, which, translated into English, more or less says: Impossible to obtain property Select of the Range class. The debugger shows me that VFP is trying to execute the first command I listed.
>>
>>The debugger tells me that tnRow, tnCol and This.oSheet all have valid values.
>>
>>Any idea, what I might be missing? Perhaps there is a safer way to insert an image in a specific position?
>>
>>TIA,
>>
>>Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)