Set the command button's TakeFocusOnClick to False, or add the following
line at the beginning of the code:
ActiveCell.Select
Deeds wrote:
I wrote code for a button that refreshes a pivottable on click. When I try to click the button using 97 I get a Run Time Error. Can someone please tell me how to use the Activesheet.RefreshPivotTable code so that it works in both 2000 & 97
Thanks
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html