Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
Can anyone please advise on how to change the positioning properties for 'all' the pictures on my spreadsheet? In order to sort properly without the results distorting the pictures, I need to set their positioning to "Move but don't size with cells". Doing this individually would mean selecting format picture then going on to the properties tab. However I can't seem to be able to do this for multiple pictures, and I have lots. I suspect the answer is in VBA (whatever that is!) I have used VBA before to set up a macro for something but just followed exactly the very good instructions from another poster, so I'm completely novice at it really. Any help would be greatly appreciated! gejmond |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I got this when I recorded a macro (to fix one picture):
Option Explicit Sub Macro1() ActiveSheet.Shapes("Picture 1").Select With Selection .Placement = xlMove .PrintObject = True End With End Sub Getting rid of the .select and cycling through all the pictures, I could use this: Option Explicit Sub testme() Dim myPict As Picture For Each myPict In ActiveSheet.Pictures myPict.Placement = xlMove Next myPict End Sub I also got rid of the .printobject stuff. gejmond wrote: Hi Can anyone please advise on how to change the positioning properties for 'all' the pictures on my spreadsheet? In order to sort properly without the results distorting the pictures, I need to set their positioning to "Move but don't size with cells". Doing this individually would mean selecting format picture then going on to the properties tab. However I can't seem to be able to do this for multiple pictures, and I have lots. I suspect the answer is in VBA (whatever that is!) I have used VBA before to set up a macro for something but just followed exactly the very good instructions from another poster, so I'm completely novice at it really. Any help would be greatly appreciated! gejmond -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks v much Dave for replying
I copied and pasted: Option Explicit Sub testme() Dim myPict As Picture For Each myPict In ActiveSheet.Pictures myPict.Placement = xlMove Next myPict End Sub as a new macro. Not sure this is what you meant for me to do but it doesn't seem to do anything. I will keep on playing with it.... |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
After you run the macro, right click on one of the pictures and see how the move
and size is set. gejmond wrote: Thanks v much Dave for replying I copied and pasted: Option Explicit Sub testme() Dim myPict As Picture For Each myPict In ActiveSheet.Pictures myPict.Placement = xlMove Next myPict End Sub as a new macro. Not sure this is what you meant for me to do but it doesn't seem to do anything. I will keep on playing with it.... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pictures in comboboxes? | Excel Worksheet Functions | |||
Excel and pictures....a few questions... | Excel Discussion (Misc queries) | |||
Custom Button Pictures | Excel Discussion (Misc queries) | |||
Inserting pictures then sorting | Excel Discussion (Misc queries) | |||
McGimpsey's Disappearing Pictures | Excel Discussion (Misc queries) |