Results 1 to 4 of 4
  1. #1
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,832
    Thanks
    136
    Thanked 484 Times in 461 Posts

    Wiggle text (Excel2007)

    In Excel 2003 I used a simple macro routine to wiggle some WordArt text.
    See attached workbook sample. This is in Excel2003 format.
    If you run it under Excel 2003, (click the Wordart shape) you should see the effect I want.
    But if you run it under Excel2007, it seems to 'stutter'.

    I know it seems a bit silly, but I use the effect in several areas.

    Any suggestions on why the tracking bit works differently with Excel2007????

    zeddy
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wiggle text (Excel2007)

    See if this is any better:
    <pre>Sub wiggleText()


    On Error Resume Next
    Set OldCell = ActiveCell

    For Z = 1 To 3 'wiggle forward and backwards 3 times
    ActiveSheet.Shapes("wordartTest1").Select 'logo text
    m = 1 'start position
    For i = 1 To 10 'wiggle forward steps
    Selection.ShapeRange.TextEffect.Tracking = m 'step forward
    m = m + 0.03125 'set next step position
    DoEvents
    Next i
    For i = 10 To 1 Step -1 'wiggle backwards
    Selection.ShapeRange.TextEffect.Tracking = m 'step backwards
    m = m - 0.03125 'set next step position
    DoEvents
    Next i
    Selection.ShapeRange.TextEffect.Tracking = 1 'reset to start position

    Next Z

    OldCell.Select
    Set OldCell = Nothing


    End Sub

    </pre>

    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,832
    Thanks
    136
    Thanked 484 Times in 461 Posts

    Re: Wiggle text (Excel2007)

    Jan

    Many thanks for your reply!
    It's been driving me nuts

    I had of course tried many different values for the tracking but hadn't come close to your figures!
    Originally, the setting was
    m = m + 0.25 'set next step position
    ..which worked fine in Excel 2003

    Your value:
    m = m + 0.03125 'set next step position
    ..works as a good compromise between both Excel2007 and Excel2003

    I also tried the following (based on your number, I just made it 10 times smaller)
    m = m + 0.003125 'set next step position

    This setting looks best for Excel2007.

    So I shall now have 2 versions, each specific for the Excel Version being used.

    Once again, many many thanks!

    zeddy


    .

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wiggle text (Excel2007)

    You can of course have VBA decide what to use:

    If Val(Application.Version)>11 Then
    'Excel 2007 or up
    mStep=0.03125
    Else
    'Excel 2003 or less
    mStep=0.25
    End If
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •