Different between Excel 97 & Excel 2000

J

Jason

Dear All,

May I know what is the different between Excel 97 & Excel
2000 ?

I try to run this coding :-

****************************************
Private Sub CommandButton1_(Click)
Sheet1.cells(1,1).delete
End Sub
****************************************
It is working on Excel 2000 but when running on Excel 97,
it prompt me this error message :-

****************************************
Run-time error '1004'
Delete method of Range class failed
****************************************

Can any expertise advise me what went wrong.
Thanks a million in advance.

Cheers....

Jason
 
D

Debra Dalgleish

Set the command button's TakeFocusOnClick to False, or add the following
line at the beginning of the code:

ActiveCell.Select
 
J

Jason

Hi Debra,

Thanks a million for your advise.
It is working. Why is it so after changing the
TakeForcusOnClick to False and it work.

Anyway, thanks for your help.
Have A Nice Weekend.
Cheers...

Jason
 
Top