Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting cells
Message
 
To
03/11/2005 17:29:04
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01064346
Message ID:
01065318
Views:
14
Hilmar,

The problem here is that the pictures.insert method seems do not allow identifying exactly the sheet+address of where to insert. So you need to make a selection, and then call insert.

But you cannot select a cell without selecting a sheet. As in Excel VBA Help for “Selecting cells on the active worksheet”:
"....If you use the Select method to select cells, be aware that Select works only on the active worksheet …....."

As far as I understand, you may select multiple objects, but activate only one among selection. So, if you work with one sheet at a time, then it does not matter what to use, activate or select.



>
>        This.oSheet.Activate
>
> This.oSheet.Cells(tnRow, tnCol).Select()
> This.oSheet.Pictures.Insert(tcFileName)
>
>That turned out to be the solution. I thought you could do ANYTHING with a sheet without actually selecting it, but it seems I was wrong.
>
>By the way, I used .oSheet.Select() instead of .oSheet.Activate(), because that is what the macro recorder produced, when I clicked on a different sheet. Is there any difference between the two?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform