Set Shp = wsDestination.Shapes("myPicture") 'Strongly recommend using a FileSystemObject.FileExists method to check if the path is good before executing the previous command Sub Insert_Pic_From_File(PicPath as string, wsDestination as worksheet) The Shape Object will have that same name as the Picture Object. Insert your Pic assigned to a variable to easily change its name. To place a new image at a specific place, I recommend creating an image at the "right" place and registering its top and left properties values of the dummy onto double variables. If it's simply about inserting and resizing a picture, try the code below.įor the specific question you asked, the property TopLeftCell returns the range object related to the cell where the top left corner is parked.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |