coolsac12
Member
Hi Team,
I have a macro to export image from my file. When I run it in break mode by pressing F8 its working fine, however when I run by pressing F5 it doesn't work.
Kindly suggest, thanks in advance.
Below is my macro:
I observed its taking time where it paste the image, as a macro its fast and skip this step.
I have a macro to export image from my file. When I run it in break mode by pressing F8 its working fine, however when I run by pressing F5 it doesn't work.
Kindly suggest, thanks in advance.
Below is my macro:
Code:
Sub ExportSheet()
Dim lr As Integer
Pth = ThisWorkbook.Path
Worksheets("Main").Range("C35:Q73").CopyPicture xlScreen, xlBitmap
Application.DisplayAlerts = False
Set oCht = Charts.Add
With oCht
.Paste
.Export Filename:=Pth & "\" & "Img.jpg", Filtername:="JPG"
.Delete
End With
End Sub
I observed its taking time where it paste the image, as a macro its fast and skip this step.
Last edited by a moderator: