Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizing Pictures with VBA or API

Status
Not open for further replies.

sabascal

IS-IT--Management
Aug 20, 2002
85
GB
Hi all,

is there a way to resize a picture in VBA or with a free API.
Ultimate objective would be to be able to select my picture on a excel sheet, and apply my procedure to it.

Thanks,
Seb
 
Hi,

Not knowing exactly what you are trying to do, something like this might work...
Code:
    For Each sh In ActiveSheet.Shapes
        With sh
            Select Case .Name
                Case "Sheet1": .OnAction = "Macro1"
                Case "Sheet2": .OnAction = "Macro2"
            End Select
            With .ShapeRange
                .LockAspectRatio = msoTrue
                .Height = .Height * 1.5
            End With
        End With
    Next
:)

Skip,
Skip@TheOfficeExperts.com
 
Sorry for not being specific.

What I mean by resize is also changing the resoltion. (decreasing the size of the picture as a consequence)
I'd to do the same thing as when you do a resize in Microsoft Paint.

Thanks,
Seb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top