Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to load pictures to image boxes in excel with a command button

i have afolder with picture files xxxx.jpg where xxxx is a number 0001-9999.
i want to load this files with just one click(command button) in a worksheet
in an exact position x,y (x stable , and y 4cm down for every picture)from
the beginning of the axis
im looking forward to hearing from you

im using office 2002
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to load pictures to image boxes in excel with a command button

Do you actually want/need to use Image controls as you subject says, or put
the images on the worksheet, as you text says ?

For the latter, recod a macro, whilst you insert 1 picture, then look to
making a loop of that code.
Having a workbook with 1000's of graphics will make for a large, slow file.

NickHK

"harris (greece)" <harris (greece) @discussions.microsoft.com wrote in
message ...
i have afolder with picture files xxxx.jpg where xxxx is a number

0001-9999.
i want to load this files with just one click(command button) in a

worksheet
in an exact position x,y (x stable , and y 4cm down for every picture)from
the beginning of the axis
im looking forward to hearing from you

im using office 2002



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to load pictures to image boxes in excel with a command bu

Well i want those pictures with certain dimensions (2x2 cm) for printing id's
if they are just opened then they are too large to fit the specified
dimensions so i believe its better to be loaded in an image box (better
idea???)So i need a method to create a numerous boxes in an exact position
(1st 1cm from top 5cm from left, 2nd 13cm (1+12) from top 5cm from left, 3rd
25cm(13+12) from top 5cm from left etc) with exact dimensions to fit the
loaded picture.
I agree that i will create a large file ,but what can i do for this?

"NickHK" wrote:

Do you actually want/need to use Image controls as you subject says, or put
the images on the worksheet, as you text says ?

For the latter, recod a macro, whilst you insert 1 picture, then look to
making a loop of that code.
Having a workbook with 1000's of graphics will make for a large, slow file.

NickHK

"harris (greece)" <harris (greece) @discussions.microsoft.com wrote in
message ...
i have afolder with picture files xxxx.jpg where xxxx is a number

0001-9999.
i want to load this files with just one click(command button) in a

worksheet
in an exact position x,y (x stable , and y 4cm down for every picture)from
the beginning of the axis
im looking forward to hearing from you

im using office 2002




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default how to load pictures to image boxes in excel with a command bu

Depending on exactly what you want, adapt this code:

Private Sub CommandButton1_Click()
Dim pic As Picture
Dim i As Long

Const MAXPICS As Long = 10
Const PICOFFSET As Long = 100

For i = 1 To MAXPICS
Set pic = ActiveSheet.Pictures.Insert("C:\Test.bmp")
With pic
.Top = i * PICOFFSET
.Left = 10
.Width = 200
.Height = 200
End With
Next

End Sub

NickHK

"harris (greece)" wrote in message
...
Well i want those pictures with certain dimensions (2x2 cm) for printing

id's
if they are just opened then they are too large to fit the specified
dimensions so i believe its better to be loaded in an image box (better
idea???)So i need a method to create a numerous boxes in an exact position
(1st 1cm from top 5cm from left, 2nd 13cm (1+12) from top 5cm from left,

3rd
25cm(13+12) from top 5cm from left etc) with exact dimensions to fit the
loaded picture.
I agree that i will create a large file ,but what can i do for this?

"NickHK" wrote:

Do you actually want/need to use Image controls as you subject says, or

put
the images on the worksheet, as you text says ?

For the latter, recod a macro, whilst you insert 1 picture, then look to
making a loop of that code.
Having a workbook with 1000's of graphics will make for a large, slow

file.

NickHK

"harris (greece)" <harris (greece) @discussions.microsoft.com wrote in
message ...
i have afolder with picture files xxxx.jpg where xxxx is a number

0001-9999.
i want to load this files with just one click(command button) in a

worksheet
in an exact position x,y (x stable , and y 4cm down for every

picture)from
the beginning of the axis
im looking forward to hearing from you

im using office 2002






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
How to insert and load an image for Excel 2003? Eric Excel Discussion (Misc queries) 3 February 9th 10 11:23 AM
Excel to load COMMAND and type a Run Command? [email protected] Excel Programming 5 August 22nd 06 10:47 PM
Load image from directory for custom toolbar of Excel 2000 Padam Excel Worksheet Functions 0 August 5th 06 06:33 PM
Entering data into two text boxes using one command button Charlie Chalk Excel Programming 2 March 24th 06 02:54 PM
Filling command button with image Josh Sale Excel Programming 4 October 5th 04 03:26 PM


All times are GMT +1. The time now is 08:18 AM.

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

About Us

"It's about Microsoft Excel"