Results 1 to 4 of 4

insert a photo (any file type), resize it, and place it in a specific location.

Threaded View

  1. #1
    Registered User
    Join Date
    03-12-2010
    Location
    Kansas City, Missouri
    MS-Off Ver
    Excel 2003
    Posts
    26

    insert a photo (any file type), resize it, and place it in a specific location.

    To date i have the following code written.

    Sub InsertPhoto()
    Range("E7").Select
    ActiveSheet.Pictures.Insert( _
    Application.GetOpenFilename( _
    "JPG picture files (*.jpg),*.jpg", , "Select the picture")).Select
    Selection.ShapeRange.LockAspectRatio = msoTrue
        Selection.ShapeRange.Height = 800
        Selection.ShapeRange.Width = 343
    End Sub
    With the code shown above I am only able to post JPeg images and I get a run time error when I attempt to cancel out of the search window (when selecting a file to insert).

    Can someone tell me what I need to do to allow my searches to cancel and allow me to search for and resize all file types and not simply JPeg images.

    Thanks.
    Last edited by jaganath; 05-05-2010 at 10:39 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1