Forum Discussion
lewisreiddd
May 20, 2020Copper Contributor
Screenshot in Excel
Hi, I'm wondering if anyone is able to help, and if my query is at all possible. I'm looking to insert a screenshot of Cells B2:P33 from a sheet called 'Progress' into another sheet called AP...
JMB17
May 21, 2020Bronze Contributor
Alt+F11 to open the visual basic editor.
Click View/Project Explorer (if the project explorer window is not already visible).
Select your workbook.
Click Insert/Module.
Double click on the newly added module (in the modules folder).
Paste this code into the code window that appears.
Sub ScreenShot()
Worksheets("Progress").Range("B2:P33").Copy
With Worksheets("APR")
.Activate
.Range("A1").Select
.Pictures.Paste Link:=True
End With
Application.CutCopyMode = False
End Sub
Close the vba window.
Click Developer/Macros - select and run the Screenshot macro. If you don't have a developer tab, click File/Options/Customize Ribbon and check the developer tab box.
Click View/Project Explorer (if the project explorer window is not already visible).
Select your workbook.
Click Insert/Module.
Double click on the newly added module (in the modules folder).
Paste this code into the code window that appears.
Sub ScreenShot()
Worksheets("Progress").Range("B2:P33").Copy
With Worksheets("APR")
.Activate
.Range("A1").Select
.Pictures.Paste Link:=True
End With
Application.CutCopyMode = False
End Sub
Close the vba window.
Click Developer/Macros - select and run the Screenshot macro. If you don't have a developer tab, click File/Options/Customize Ribbon and check the developer tab box.
- lewisreidddMay 21, 2020Copper Contributor
JMB17Thank you so much! That is a great help!
Do you know how I can do this at the click of a button? I have inserted a button through the developer tab called, Insert Screenshot.
- lewisreidddMay 21, 2020Copper Contributor
Never mind, I figured it out! Thanks again for all your help, I appreciate it!