Hi everyone,
I'm getting a error in the code. its saying:
Run-time error '1004'
Select method of range class.
This is the line its highlighting.
[VBA]Range("B2").Select 'select the cell where you want to place your image [/VBA]
Here is the entire code.
[VBA]
Sub Convert_Group_Objects_into_JPEGS()
Dim sht As Worksheet
Dim shp As Shape
Application.ScreenUpdating = False
For Each sht In ActiveWorkbook.Sheets
For Each shp In sht.Shapes
sht.Activate
If shp.Type = msoGroup Then
shp.Cut
Range("B2").Select 'select the cell where you want to place your image
sht.PasteSpecial Format:="Picture (JPEG)", Link:=False, _
DisplayAsIcon:=False
Exit For
End If
Next
Next
End Sub
[/VBA]
Do you know what I'm doing wrong?
The code above convert all group objects in the workbook into Jpegs.