Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Insert Picture Into Form

I have never used excel before. I need to make a form with a box. When
you click on the box it should ask if you want to add a picture to the
box. It should also format the picture so that it is the same size as
the box. Can this be done in excel or do I have to use another
application for this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Insert Picture Into Form

I really need to find the answer to my question so please post a
response if you have any idea of how this can be done.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Insert Picture Into Form

you can use excel for this but if you've never even used excel before,
it's going to be awfully difficult to explain & implement............
susan


On Jun 28, 12:25 pm, wrote:
I really need to find the answer to my question so please post a
response if you have any idea of how this can be done.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Insert Picture Into Form

what is the purpose of this, anyway??????
what's the good of a user putting a picture on the form? he can't
utilize it then. he can't print it. it's really just an
exercise...........
sounds like homework - we don't do homework for people in this
newsgroup.

try searching:

userform
open file
picture on userform

susan


On Jun 28, 12:25 pm, wrote:
I really need to find the answer to my question so please post a
response if you have any idea of how this can be done.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Insert Picture Into Form

Its not homework. Its something I am doing for my boss. I dont' have
any experience with access but some of the other people I work with
do. If you know how to do this please post it.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Insert Picture Into Form

If you have never used Excel or VBA before I'm afraid you will have at least
a some learning to do before you are likely to get any more answers.

This might get you started -

Add an image control named Image1 to a Userform
You may need to do some research if you're not sure how to do that.

Add the following code to the userform module

Private Sub Image1_Click()
Dim vFile
Dim sFilter As String
Dim wd As Single, ht As Single

sFilter = "Picture Files,*.jpg;*.bmp;*.gif"
vFile = Application.GetOpenFilename(sFilter)

If vFile = False Then Exit Sub
On Error GoTo errH

With Me.Image1
.AutoSize = True
.Left = 0 ' comment if you don't want to move the image
.Top = 0
.Picture = LoadPicture(vFile)
wd = .Width
ht = .Height
End With

'delete form resize stuff if not required
Me.Top = 0
Me.Left = 0
Me.Width = wd + (Me.Width - Me.InsideWidth)
Me.Height = ht + (Me.Height - Me.InsideHeight)

'but keep this
AppActivate Me.Caption
Exit Sub
errH:
MsgBox Err.Description
End Sub

Run the form and click the image control

Regards,
Peter T

wrote in message
ups.com...
I have never used excel before. I need to make a form with a box. When
you click on the box it should ask if you want to add a picture to the
box. It should also format the picture so that it is the same size as
the box. Can this be done in excel or do I have to use another
application for this?



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 do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Picture on Form kirkm[_6_] Excel Programming 14 October 31st 06 03:09 PM
Picture on Form (VB) kirkm[_6_] Excel Programming 2 September 25th 06 02:51 AM
Insert Picture [email protected] Excel Programming 2 March 16th 06 12:51 AM


All times are GMT +1. The time now is 08:13 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"