Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Trouble positioning an autoshape object using .Top in Excel 2007

I wrote a macro in Excel 2003 that places an Autoshape objects at the top of
each row and then moves on to the next row. This has worked fine in 2003 but
our office is slowly migrating to 2007 and the template is having problems.

When the same macro is run using Excel 2007, line by line, the objects
appear to creap high and higher in the row to the point where they start
looking to be start in the row above them. Has something changed in Excel
2007 that would prevent this 2003 functionality from working in 2007?

Sample Code:
Do While bGenericContinue = True
nProjectedBarLeft = 135
nProjectedBarTop = Cells(iTgtRowNum, 1).Top
nProjectedBarWidth = 245
nBarHeight = Cells(iTgtRowNum, 1).Height
ActiveSheet.Shapes.AddShape(msoShapeRoundedRectang le,
nProjectedBarLeft, nProjectedBarTop, nProjectedBarWidth, nBarHeight).Select
iTgtRowNum = iTgtRowNum + 1
If iTgtRowNum = 25 Then
bGenericContinue = False
End If
Loop


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparency slider and Fill trouble in Autoshape Dave Excel Discussion (Misc queries) 0 May 25th 09 10:31 PM
autoshape on my chart got locked - Excel 2007 Vipul Charts and Charting in Excel 0 September 25th 08 01:33 PM
Positioning an Object (say a box) on a Excel cell Ken Excel Programming 3 October 5th 05 05:47 AM
AutoShape Positioning? Ken Excel Discussion (Misc queries) 2 February 8th 05 11:45 PM
Positioning a graphical object Tom Ogilvy Excel Programming 0 July 27th 04 05:39 PM


All times are GMT +1. The time now is 12:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"