+ Reply to Thread
Results 1 to 2 of 2

VBA to Zoom In and Zoom Out of a picture or object

  1. #1
    Registered User
    Join Date
    06-05-2007
    Posts
    12

    VBA to Zoom In and Zoom Out of a picture or object

    Hi Team,
    I would like to zoom in (5 times) to any selected picture and then zoom out to its normal size. I am able to write a code to zoom with but unable to zoom out to its actual size before zooming in. The code I am using is as below.

    sub ZoomIn()

    Selection.ShapeRange.ScaleWidth 4.2983850003, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.ZOrder msoBringToFront
    End Sub

    Sub ZoomOutUndo()

    With Application
    .EnableEvents = False
    .undo
    .EnableEvents = True
    End With
    End Sub

    Thanks heaps in advance for your help in this regard.
    Jay K

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello jaybaba,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 04-17-2020, 04:23 AM
  2. Code to zoom any picture in the sheet automatically
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-02-2017, 10:25 AM
  3. [SOLVED] Double click to zoom any picture in worksheet
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 03-30-2017, 10:41 AM
  4. VBA copy excel as a picture to word - zoom picture
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2016, 06:47 AM
  5. Form picture to zoom-in on mouse over
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-21-2016, 10:19 AM
  6. Form picture to zoom-in on cursor
    By quykh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-19-2016, 10:08 AM
  7. Zoom in on selected picture
    By ufo_pilot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-02-2006, 04:20 PM

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