Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-04-2023, 07:32 AM
JohnWilson JohnWilson is offline Change The Dimensions of Second Shape on the Selected Slide Only Windows 10 Change The Dimensions of Second Shape on the Selected Slide Only Office 2019
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

The code works fine here but why not just change the selected shape?

Code:
Sub ChangeDimensionsOfSelectedShape()
    Dim oshp   As Shape
    Dim newWidth As Integer
    Dim newHeight As Integer

    ' Set the new dimensions
    newWidth = 100 ' these do nothing
    newHeight = 50 ' these do nothing

    'set osld to currenht slide
    Set oshp = ActiveWindow.Selection.ShapeRange(1)
    With oshp
        ' Change the dimensions of the shape
        .Width = 930
        .Height = 428
        .Left = 15
        .Top = 77
    End With
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
 

Tags
powe



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the internal wall dimensions for T room mummy Visio 0 06-15-2017 09:23 PM
How to change size / shape of a shape in a stencil tomgoodell Visio 1 06-30-2016 04:40 AM
Change The Dimensions of Second Shape on the Selected Slide Only Dimensions of a Table Created in Word 2013 Change when saved in Word 2016 PKW57 Word Tables 2 05-26-2016 05:15 AM
Change The Dimensions of Second Shape on the Selected Slide Only Word - Resize image to specified selected cells' dimensions FaizanRoshan Word VBA 7 10-18-2015 03:34 PM
Determine if a shape is selected Byron Polk Word VBA 2 08-06-2014 02:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft