Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Macro Word 97 v Word2002 (2002/SR2)

    <P ID="edit" class=small>(Edited by acerfmayer on 15-Oct-06 10:42. I should have explained this works in a 4-column table: you enter date, time began, time finished and with cursor in 4th column, run the macro and the time spent will appear in 4th column.)</P>Morning -

    I copied and pasted this macro into a computer that uses Word 97 and it runs fine. I then copied it to our computer that runs Word 2002 and I keep getting "Word encountered a problem

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Word 97 v Word2002 (2002/SR2)

    It works in Word 2003 (see attached).

    Try a fresh table and see whether the problem is some corruption in your existing table.

    If that doesn't help, try using the de###### to step through the code and watch the values as they are set.
    Attached Files Attached Files

  3. #3
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Re: Macro Word 97 v Word2002 (2002/SR2)

    Jefferson -

    Thanks, and for the attachment.

    I tried the macro again, and this time using your table with different values entered, and the message was as sometimes received before:

    Run-time error 13, Type mismatch

    The de###### highlights

    T2 = TimeValue(Left(C2, Len(C2) - 2))

    Hope this is of value, and thanks again.

  4. #4
    5 Star Lounger
    Join Date
    Jul 2003
    Location
    USA
    Posts
    728
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Re: Macro Word 97 v Word2002 (2002/SR2)

    Oops and Red-faced!!!!!!!!!!!!!!!!!!!!

    I failed to use colons when entering the time. Sorry for using your time on this.

    Acer....

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Word 97 v Word2002 (2002/SR2)

    It actually would be more convenient to be able to type 905 or 1900 than times with colons. But it would take some additional code to accommodate that, and perhaps a more explanatory error message would be a better workaround for now.

Posting Permissions

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