Macro doesn't work in Excel 97
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Macro doesn't work in Excel 97

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    The following macro made for excel 2000 doesn't work in the 97 version. What do I need to change?

    Sheets("Sheet2").Rows("2").ClearContents

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Code looks ok, so I suspect you are running the macro from an ActiveX Control. Set it's TakeFocus******* Propery to false or select any cell as the first line. If it's only to run a Procedure you should be able to use a CommandButton from the "Forms" toolbar.



  3. #3
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Also, in the VBA editor on the 97 system, check the resources menu and see if any of your resources are listed as MISSING. if they are, uncheck them and try to run it again.

  4. #4
    New Member
    Join Date
    Mar 2002
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    HI, thanks for the help guys. Only, when you say I am running the script from an activeX property, I just set a command button and put the clearContent action in place.

    I need all people on our system to be able to use this form, so I want the form to be working and self contained, not working on one computer and not on another.

    You say I should set the TakeFocus******* property - this is not to a command button, but to an ActiveX Property?

    Iam confused.

    PLease help.

  5. #5
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Hi

    I am assuming the CommandButton you are using is from the "Control toolbar"?

    While in edit mode (left most icon on the control toolbar) right click on the buttom and select "Properties" then scroll down to TakeFocus******* and set it to "False". Or another way is to use:

    Range("A1").Select

    as the first line in your row clearing code.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com