I have a VBA code I've cooked up, but i'm having issues getting a few lines of code entered in....this is the excerpt:
' This copies Hazards of the 175-1 Worksheet to the new workbook
ThisWorkbook.Activate
Sheets("hazards").Select
Range("a1:z114").Select
Selection.Copy
Cells.Select
ActiveWindow.ActivateNext
Sheets("Sheet3").Select
ActiveSheet.Range("a1").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.ColumnWidth = 4
Selection.RowHeight = 12.75
ActiveWindow.Zoom = 80
ActiveSheet.PageSetup.PrintArea = "a1:z50,a51:z98"
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 2
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.CenterVertically = False
End With
The issue is that I have somewhere between 1 to possibly 8 images inside the main workbook. I need to be able to change the the properties of the images (in excel under Size and Properties; properties; Move and size with cells)
After that the spreadsheet and images should be copied to a new worsheet and resized according to the macro.
Question is HOW do I change those properties prior to copying and pasting the worksheets to the new workbook?
Any help that can be give I would greatly appreciate it.
H.
' This copies Hazards of the 175-1 Worksheet to the new workbook
ThisWorkbook.Activate
Sheets("hazards").Select
Range("a1:z114").Select
Selection.Copy
Cells.Select
ActiveWindow.ActivateNext
Sheets("Sheet3").Select
ActiveSheet.Range("a1").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.ColumnWidth = 4
Selection.RowHeight = 12.75
ActiveWindow.Zoom = 80
ActiveSheet.PageSetup.PrintArea = "a1:z50,a51:z98"
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 2
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.CenterHorizontally = True
.CenterVertically = False
End With
The issue is that I have somewhere between 1 to possibly 8 images inside the main workbook. I need to be able to change the the properties of the images (in excel under Size and Properties; properties; Move and size with cells)
After that the spreadsheet and images should be copied to a new worsheet and resized according to the macro.
Question is HOW do I change those properties prior to copying and pasting the worksheets to the new workbook?
Any help that can be give I would greatly appreciate it.
H.