Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox change property

I have a code attached to a "change" event that executes after an unrelated
pivot table refresh button. Since it isn't expected to execute at that time,
I get error messages and failures. I'm a SAS programmer and not very
familiar with VB. Naturally, there's an unrealistic deadline and I'm
pleading for help.

Here's the error:
Run-time error '1004'
Unable to get PivotFields property of the PivotTable class.

On debug, I am taken to a sub routine that is called from a change event
from a list box on the same page that holds the button which was pressed (to
generate the error). Also, when the change control is activated directly,
there is no error and the code works fine.

I'd send the whole thing, but I think it would be too big (due to the
underlying databases)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Combobox change property

Hi

Either have a global variable, like

Public AutoClick as Boolean

set it to true when you want to indicate that code is managing everything,
so do nothing, dear events. In top of the click event then

If AutoClick = True then Exit Sub

Or, when unrealistic deadlines seem too close, put

On Error Resume Next

just everywhere. No crashes ever again, no error messages, some things works
perfect and some simply don't.

HTH. Best wishes Harald

"SASMan" skrev i melding
...
I have a code attached to a "change" event that executes after an

unrelated
pivot table refresh button. Since it isn't expected to execute at that

time,
I get error messages and failures. I'm a SAS programmer and not very
familiar with VB. Naturally, there's an unrealistic deadline and I'm
pleading for help.

Here's the error:
Run-time error '1004'
Unable to get PivotFields property of the PivotTable class.

On debug, I am taken to a sub routine that is called from a change event
from a list box on the same page that holds the button which was pressed

(to
generate the error). Also, when the change control is activated directly,
there is no error and the code works fine.

I'd send the whole thing, but I think it would be too big (due to the
underlying databases)



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change insidewidth property M Selvaraj Charts and Charting in Excel 1 April 23rd 06 01:07 PM
Cont' Value and Text Property of Combobox augustus Excel Programming 0 November 1st 04 10:18 PM
change Company property Maileen Excel Programming 2 September 29th 04 09:02 PM
Change Option Button Property Value with VBA Jm Excel Programming 1 May 14th 04 07:38 PM
Change minimumscale with the change event of a combobox Herbert Chan Excel Programming 1 April 11th 04 12:43 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"