I have this code and it produces a jpeg of the range that I select and stores the file in the place i have designated for it. However the problem I have is that it produces a new sheet in the work book which i don't want, if anyone has any ideas that would be a great help.
Code:
Private Sub CommandButton1_Click()
Dim sSheetName As String
Dim oCht As Chart
'Worksheet to work on
sSheetName = "Del to SREP"
Worksheets(sSheetName).Range("A1:C3").CopyPicture xlScreen, xlBitmap
Set oCht = Charts.Add
With oCht
.Paste
.Export Filename:="C:\Users\tom.beynon\Documents\Screen Rips\Del to SREP.jpg", Filtername:="JPG"
End With
End Sub
Last edited: