+ Reply to Thread
Results 1 to 3 of 3

change size of object

  1. #1
    choice
    Guest

    change size of object

    Sub changesquare()
    Sheets("IZEN").activate
    ActiveSheet.Shapes("izensquare").Select
    Selection.ShapeRange.ScaleHeight Range("f4").Value, msoFalse,
    msoScaleFromTopLeft
    Selection.ShapeRange.ScaleWidth Range("d4").Value, msoFalse,
    msoScaleFromTopLeft
    Range("a1").Select
    End Sub

    this changes the object by a percentage, how do i go about changing the size
    to like inches, if in f4 it says 5 have it 5inches, not 500% of current size

    thanks in advance

  2. #2
    Registered User
    Join Date
    02-18-2005
    Posts
    26
    Sub changesquare()
    'converts inches to points on screen
    intHeightIncrease = inchestopoints(Range("f4").Value)
    intWidthIncrease = inchestopoints(Range("d4").Value)
    Sheets("IZEN").activate
    With ActiveSheet.Shapes("izensquare")
    .Height = .Height + intHeightIncrease
    .Width = .Width + intWidthIncrease
    End With
    Range("a1").Select
    End Sub

    cheers!
    jer

  3. #3
    Rowan
    Guest

    RE: change size of object

    You can set the pixel size of the shape like this:

    Sub changesquare()
    Sheets("IZEN").Activate
    ActiveSheet.Shapes("izensquare").Select
    Selection.ShapeRange.Height = Range("F4").Value
    Selection.ShapeRange.Width = Range("D4").Value
    Range("A1").Select
    End Sub

    So for 5 inches your value in D4 would need to somewhere in the high hundreds.

    Hope this helps
    Rowan

    "choice" wrote:

    > Sub changesquare()
    > Sheets("IZEN").activate
    > ActiveSheet.Shapes("izensquare").Select
    > Selection.ShapeRange.ScaleHeight Range("f4").Value, msoFalse,
    > msoScaleFromTopLeft
    > Selection.ShapeRange.ScaleWidth Range("d4").Value, msoFalse,
    > msoScaleFromTopLeft
    > Range("a1").Select
    > End Sub
    >
    > this changes the object by a percentage, how do i go about changing the size
    > to like inches, if in f4 it says 5 have it 5inches, not 500% of current size
    >
    > thanks in advance


+ Reply to Thread

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