![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 24
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
Board Regular
Join Date: Feb 2002
Location: Houston,Texas
Posts: 418
|
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 |
|
New Member
Join Date: Mar 2002
Posts: 24
|
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 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|