Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #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
Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
  #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


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
writing a shape to a file ironchef Java Basics 0 November 8th, 2006 05:35 PM
ado shape syntax sunpalozzi SQL Language 0 November 2nd, 2006 03: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 10:20 AM
Shape My Command-Please btpoole VB Databases Basics 0 March 6th, 2004 11:33 PM



All times are GMT -4. The time now is 10:59 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.