Images in

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:42 PM GMT

Question

QUESTION: we have some recipe setups to be done in excel. i want the user i.e. chef to be able to place an image of the recipe on the top of the recipe. i want to enable the user to browse to the image file and place it in excel

Please help!

ANSWER: Take a screenshot of the image, and just paste it into- you can crop the image. Or am I not understanding what you want...?

---------- FOLLOW-UP ----------

QUESTION: i want to place a image placeholder in sheet and let the user browse and insert the image he wants in that placeholder.

Answer

There's no such thing as an image placeholder in a sheet. You can force the image to go to a particular cell, like this example uses cell C2 as the top left corner of the picture:

Sub InsertPicture()

   Range("C2").Select
   On Error Resume Next
   filetoimport = Application.GetOpenFilename("Picture Files (*.jpg),*.jpg,Picture Files (*.mpg),*.mpg")
   ActiveSheet.Pictures.Insert (filetoimport)

End Sub


HTH

Advertisement

©2021 eLuminary LLC. All rights reserved.