Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 11th, 2006, 09:20 AM
Authorized User
 
Join Date: Nov 2003
Location: Horby, , Sweden.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Rotating shape in VBA (not center of shape)

Hi all
I am trying to get an object to rotate with VBA.
That´s easy to make it rotate using Selection.ShapeRange.IncrementRotation "some number"
BUT it will then rotate the center of the object.
If you push CTRL while rotating the shape it will rotate along the base of the object instead.
Howe is this achieved in VBA?

Thanx in advance
Piblon
  #2 (permalink)  
Old April 13th, 2006, 03:11 AM
Authorized User
 
Join Date: Mar 2006
Location: London, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

not sure if there is an easy way.. you may need to rotate then move
  #3 (permalink)  
Old April 13th, 2006, 03:52 AM
Authorized User
 
Join Date: Nov 2003
Location: Horby, , Sweden.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi again
I could not see any difference (I am using Office 2003)

What if you want to use ShapeRange.Rotation = "some number" instead?
It is possible to rotate from the base with this command?

//
Piblon

  #4 (permalink)  
Old April 13th, 2006, 04:04 AM
Authorized User
 
Join Date: Mar 2006
Location: London, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry first post was incorrect, thats why I changed it... to rotate 180 degrees try

Code:
With ActiveSheet.Shapes(1)
    .IncrementRotation 180#
    .IncrementTop Selection.Height
End With




Similar Threads
Thread Thread Starter Forum Replies Last Post
writing a shape to a file ironchef Java Basics 0 November 8th, 2006 06:35 PM
ado shape syntax sunpalozzi SQL Language 0 November 2nd, 2006 04:43 PM
Delete object shape name stepdev Excel VBA 0 May 3rd, 2006 11:57 AM
Transform Shape and BPEL ahtisham_a Biztalk 0 November 27th, 2004 11:20 AM
Shape My Command-Please btpoole VB Databases Basics 0 March 7th, 2004 12:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.