DEV Community

Andrews
Andrews

Posted on • Originally published at geekexcel.com on

Insert a Linked Image using Macros (VBA) in Excel Office 365!!

Do you want to know how to create a linked image in Excel? don’t worry we will introduce a great feature of Excel that is VBA and Macros. Using it we will quickly Insert a Linked Image in Excel Office 365. Lets us see the steps needed to create a linked image.

Steps to Insert a Linked Image using Macros:

To create a linked image on your worksheet using Macros, follow the below instructions.

  • On the Developer Tab, select the Visual Basic option under the Code section.

Select Visual Basic option
Select the Visual Basic option

  • You need to activate the sheet where you want to insert a linked image in Excel.
  • Now, enter the below code.

VBA code to insert linked image using Macros

‘Ensure that you have a selected range

Sub InsertALinkedImage()

Selection.Copy

‘You need to paste the selection as an image

ActiveSheet.Pictures.Paste(Link:=True).Select

End Sub

  • You need to save the code by selecting it. Then close the window.

Save the code
Save the code

  • You have to open the sheet containing the data. On the Developer Tab, choose the Macros option in the Code section.

Choose the Macros option
Choose the Macros option

  • You need to make sure that your macro is selected and click the Run button.

Click Run button
Click Run button

  • Now, you will see the created linked image as shown in the below screenshot. You can double-click on it to navigate to that specific page.

Click here
Click here

Verdict:

From this post, we guided you to learn the steps to Insert a Linked Image in Excel Office 365. Drop your worthwhile feedback with us in the below comment section. Thanks for visiting Geek Excel. Keep Learning!

Read Also:

Top comments (0)