Join StudyUp.com Today

It's always free and anyone can join!

Watch StudyUp Demo Video Now

You Recently Visited

Hidden Pictures Worksheets

Mike Said:

CopyPicture macro in Excel 2007?

We Answered:

-------EDIT--------

I removed the Paste everything line and added back the paste values and format lines.

I added some code to copy and paste two pictures. I don't know the names of your pictures. You may have to tweek the code and add your specific picture names. You could record a dummy macro to copy and paste each picture and then see their names in the code.


***Updated Code Below***
---------------------------------


Try this. I cleaned up some other stuff as well. Hopefully I didn't mess it up. The main change was to paste everything (pictures, formulas, formats, etc.), and then paste values to replace formulas.

-----------------------------------

Sub copypaste3()

Dim OrigWB As Workbook
Dim NewWB As Workbook

Application.ScreenUpdating = False

Set OrigWB = ActiveWorkbook

Range("A1:G85").Copy
Set NewWB = Workbooks.Add
'Worksheets("Sheet1").Paste
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Selection.PasteSpecial Paste:=xlPasteFormats
Selection.PasteSpecial Paste:=xlPasteColumnWidths

'Replace "Picture 1" and "Picture 2"
'With the names of YOUR pictures
With OrigWB.Worksheets("Sheet1")
.Shapes("Picture 1").Copy
NewWB.Worksheets("Sheet1").Paste
.Shapes("Picture 2").Copy
NewWB.Worksheets("Sheet1").Paste
End With

Worksheets("Sheet1").PageSetup.Zoom = 60
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.Zoom = 60
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(1#)
.BottomMargin = Application.InchesToPoints(0.37)
.HeaderMargin = Application.InchesToPoints(0.17)
.FooterMargin = Application.InchesToPoints(0.18)
End With

'Check cells C28 to C67
'Have to step backwards if you want to delete rows
For Row = 67 To 28 Step -1
If Cells(Row, 3).Value = 0 Then
Rows(Row).Clear
Rows(Row).Hidden = True
'Rows(Row).Delete
End If
Next Row

Rows("12:12").RowHeight = 25
Rows("14:14").RowHeight = 25
Rows("16:16").RowHeight = 25
Rows("18:18").RowHeight = 25
Rows("20:20").RowHeight = 25
Rows("22:22").RowHeight = 25
Rows("24:24").RowHeight = 25

'Hidedelete Column "E"
Columns(5).Hidden = True
'Columns(5).Delete

Range("A1").Select
Application.ScreenUpdating = True

End Sub


-----------------------------------

Brandy Said:

Hey teachers...?

We Answered:

Enchantedlearning.com has some great printouts for any subject.

Guy Said:

I'm 15 years old and I've been getting emotionally and verbally abused my whole life What Should I Do?

We Answered:

I feel like crying after reading this story. Get out of there, call the police if she hits you with anything. And, move out of the house. If you have a boyfriend, live with him (if possible). And goodluck!

Discuss It!