PC Review


Reply
Thread Tools Rate Thread

Code doesn't work from in Office 2003

 
 
Dennis Cheung
Guest
Posts: n/a
 
      30th Jun 2009

The following code worked fine in office xp but not in 2003

Private Sub Worksheet_Calculate()
Application.EnableEvents = True
Run ("SelectAfter")
Application.EnableEvents = True
End Sub

The problem is when I tried to unhide rows in the sheet, the marco
"SelectAfter" runs. And I only need it runs when somethng changed in PVT. It
worked fine in XP version but above situiation happened after I changed to
2003.
The marco SelectAfter means to hide 2 rows after select other items in PVT.

Can someone help?
--
Dennis Cheung
 
Reply With Quote
 
 
 
 
Dennis Cheung
Guest
Posts: n/a
 
      30th Jun 2009

Thanks Jacob. After following your code,
The marco didn't run when I unhide rows. But it didn't run after slecting
other item in Pivot Table.
--
Dennis Cheung


"Jacob Skaria" wrote:

> Private Sub Worksheet_Calculate()
> Application.EnableEvents = False
> 'your code
> Application.EnableEvents = True
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Dennis Cheung" wrote:
>
> > The following code worked fine in office xp but not in 2003
> >
> > Private Sub Worksheet_Calculate()
> > Application.EnableEvents = True
> > Run ("SelectAfter")
> > Application.EnableEvents = True
> > End Sub
> >
> > The problem is when I tried to unhide rows in the sheet, the marco
> > "SelectAfter" runs. And I only need it runs when somethng changed in PVT. It
> > worked fine in XP version but above situiation happened after I changed to
> > 2003.
> > The marco SelectAfter means to hide 2 rows after select other items in PVT.
> >
> > Can someone help?
> > --
> > Dennis Cheung

 
Reply With Quote
 
Dennis Cheung
Guest
Posts: n/a
 
      30th Jun 2009

Thanks Jacob.

After following your code, the marco didn't run after unhiding rows. But it
didn't run after selecting other items in pivot table.
--
Dennis Cheung


"Jacob Skaria" wrote:

> Private Sub Worksheet_Calculate()
> Application.EnableEvents = False
> 'your code
> Application.EnableEvents = True
> End Sub
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>
> "Dennis Cheung" wrote:
>
> > The following code worked fine in office xp but not in 2003
> >
> > Private Sub Worksheet_Calculate()
> > Application.EnableEvents = True
> > Run ("SelectAfter")
> > Application.EnableEvents = True
> > End Sub
> >
> > The problem is when I tried to unhide rows in the sheet, the marco
> > "SelectAfter" runs. And I only need it runs when somethng changed in PVT. It
> > worked fine in XP version but above situiation happened after I changed to
> > 2003.
> > The marco SelectAfter means to hide 2 rows after select other items in PVT.
> >
> > Can someone help?
> > --
> > Dennis Cheung

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: Code doesn't work from in Office 2003 Jacob Skaria Microsoft Excel Programming 0 30th Jun 2009 08:26 AM
Office 2003 - Access repair and compress doesn't work =?Utf-8?B?UmVNZUU=?= Windows Vista General Discussion 1 3rd Nov 2006 02:40 PM
I installed office 2003 and outlook doesn't work. won't con =?Utf-8?B?VC1Nb29yZQ==?= Microsoft Outlook Discussion 1 2nd Apr 2006 11:06 PM
I loaded updates for Office 2003 and now my email doesn't work =?Utf-8?B?TlQ=?= Microsoft Outlook Discussion 0 20th May 2005 03:31 PM
VS.net Debugger doesn't work anymore since I installed Office 2003 Rvo Microsoft Dot NET 1 12th Dec 2003 02:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 PM.