Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
gejmond
 
Posts: n/a
Default Positioning all pictures

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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Positioning all pictures

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   Report Post  
Posted to microsoft.public.excel.misc
gejmond
 
Posts: n/a
Default Positioning all pictures

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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Positioning all pictures

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pictures in comboboxes? Jono Excel Worksheet Functions 0 March 13th 06 06:23 PM
Excel and pictures....a few questions... marko Excel Discussion (Misc queries) 3 February 15th 06 06:45 AM
Custom Button Pictures Sloth Excel Discussion (Misc queries) 1 January 13th 06 01:08 AM
Inserting pictures then sorting Dav Excel Discussion (Misc queries) 2 November 3rd 05 11:39 AM
McGimpsey's Disappearing Pictures PW11111 Excel Discussion (Misc queries) 1 October 10th 05 03:52 PM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"