VBA image properties code issue

Mordax

New Member
Joined
Mar 30, 2004
Messages
4
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.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top