Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
marko
 
Posts: n/a
Default Excel and pictures....a few questions...

Hi!

Here is the problem. I work in excel and i have to insert some
pictures(about 30-50 of them), lets say all pictures from a specific
folder. so i go to insert -- picture -- from file. thats fine. All my
pictures are the same dimension- 640x480 and when i put them in excel
some are big and some are small! why is that?

now i have a VB question. How can i select all of these pictures
through VBA. i would like VBA to select all pictures on the active
sheet, i know how to resize them.

And the last question. Is there a way with VBA to take all pictures on
a sheet and put them i rows and columns so that it looks nice, and
align them. i would like 5 pictures to be in a row and if there are 40
pictures there would be 8 rows, so that i can see them all and that
they are aligned!
sorry for my bad english! :)
Thanks in advance for any help!

Marko Svaco

  #2   Report Post  
Posted to microsoft.public.excel.misc
Eric_MUC
 
Posts: n/a
Default Excel and pictures....a few questions...

Hi marko,

for selecting all images on your worksheet simply use:

ActiveSheet.Shapes.SelectAll

for your question about aligning the images in rows and cols try to use this
code:

Private Sub Sort_All_Images()
Dim intI As Integer, intTop As Integer, intLeft As Integer

With ActiveSheet

intTop = 1
intLeft = 1

For intI = 1 To .Shapes.Count

If intI / 5 < Int(intI / 5) Then
.Shapes(intI).Top = intTop
.Shapes(intI).Left = intLeft
intLeft = intLeft + 100
Else
.Shapes(intI).Top = intTop
.Shapes(intI).Left = intLeft
intTop = intTop + 100
intLeft = 1
End If

Next intI

End With

End Sub

You can even adjust the 100 as you would like to (best would be if these
values are higher than the height and width of the images...

Did this help you?

Best wishes,
Eric



"marko" wrote:

Hi!

Here is the problem. I work in excel and i have to insert some
pictures(about 30-50 of them), lets say all pictures from a specific
folder. so i go to insert -- picture -- from file. thats fine. All my
pictures are the same dimension- 640x480 and when i put them in excel
some are big and some are small! why is that?

now i have a VB question. How can i select all of these pictures
through VBA. i would like VBA to select all pictures on the active
sheet, i know how to resize them.

And the last question. Is there a way with VBA to take all pictures on
a sheet and put them i rows and columns so that it looks nice, and
align them. i would like 5 pictures to be in a row and if there are 40
pictures there would be 8 rows, so that i can see them all and that
they are aligned!
sorry for my bad english! :)
Thanks in advance for any help!

Marko Svaco


  #3   Report Post  
Posted to microsoft.public.excel.misc
marko
 
Posts: n/a
Default Excel and pictures....a few questions...

YOU ARE A GENIOUS!!!!!!!!!!!
IT WORKS PERFECTLY!!!!!
THANKS A MIOLLION!!!!!!

Marko Svaco

  #4   Report Post  
Posted to microsoft.public.excel.misc
Eric_MUC
 
Posts: n/a
Default Excel and pictures....a few questions...

Hi Marco,

thx for the compliments - you're welcome.
Could you pls mark the answer as the answer to your question?

Thx in advance and best wishes,
Eric


"marko" wrote:

YOU ARE A GENIOUS!!!!!!!!!!!
IT WORKS PERFECTLY!!!!!
THANKS A MIOLLION!!!!!!

Marko Svaco


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
All pictures disappear from my whole excel file when I use 'hidden greencecil Excel Worksheet Functions 2 December 13th 05 09:25 AM
Excel 2003 Inserted pictures formatted in PNG format. WildBill Excel Discussion (Misc queries) 0 November 18th 05 09:03 PM
Insert & link a graphic file in Excel 2003 -- updatable pictures! ODI Excel Discussion (Misc queries) 7 November 14th 05 02:36 PM
Link pictures in Excel 2003 doesn't work! ODI Excel Discussion (Misc queries) 4 November 5th 05 02:23 PM
i want to import all pictures into excel at the same size without. Laura Taylor Setting up and Configuration of Excel 0 December 21st 04 11:07 AM


All times are GMT +1. The time now is 12:40 AM.

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"