Posts by Badger101

    Ok this is one but it driving me mad. Just moved one of my PCs at work to windows 8. When I press ctrl + 1 to invoke format number as I have been doing for years it brings up the dialog but then windows moves my excel window to the second monitor. Some conflict is going on. Any ideas how to fix it?


    Thanks,

    Re: Can not understand pivot table behaviour


    In the original file the lab no was calculated with a formula. There was then about 6 pages of pivot charts based on the data and with the page being driven by a worksheet change event. Only issue was when lab 23 was selected it showed data for Lab 24. when lab 109 was selected it showed data for lab 23. when lab 24 was selected it showed nothing. All other 100+ labs worked fine


    Anyway just put -- at start of my formula as a quick fix and that seemed to be the only way to get it to work. So although it seems to be a bug with excel it is for me now solved.

    ok have got quite a nifty system set up but then noticed that the pivot tables on certain occasions were not given the correct result with no explanation as to why.


    I have tried to greatly simplfy the spreadsheet to demonstrate the issue but could not recreate it exactly. However if somebody could tell me where the Lab No 109 in the attached pivot table is coming from that may help.

    Re: Chart Deactivate Event of Class Firing but not sure why


    ok thanks for taking a look. the declaration was in a standard module. I am not buying the specials cells event trigger thing as just not seeing that in action. In end just stopped the form firing from the workbook open event and allowed the user to lanch it from a button and that solved the problem. CoolBlue thanks for trying to help and I agree my explanation was poor.

    Re: Chart Deactivate Event of Class Firing but not sure why


    The chart is never deactivated, thats the point. No sheets are activated and no other code is running other than the form loading. Just going to put it down to one of the not so perfect quirks you get with excel in certain situations. Will put a dirty fix in. Thanks anyway.

    OK this is confusing me. Here is a simplfied description of my problem.


    I Have userform which loads when workbook open. This has a button which hides the form then sets a chart on the activesheet to a class I have set up and activates that chart. The class has a select event which basically looks at the data point selected and puts the value in a cell to drive a picture on the dashboard to show relevant data to the point selected. When the chart is deactivated the event causes the userform to pop back up. trouble is this always work when I run the procedure from the workbook but not when the workbook opens and fires the form up. The problem is the deactivate event of the chart class kicks in and shows the form everytime. If a stop the process and rerun in the workbook all good again.


    Class module




    Setting the chart to the class.


    Code
    Dim myClassModule As New ChartClass
     
    Sub InitializeChart()
     Set myClassModule.myChartClass = Sheet3.ChartObjects(1).Chart
    End Sub


    and the button code


    Code
    Private Sub CommandButton5_Click()
    
    
    Sheet3.ChartObjects(1).Activate
    Me.Hide
    InitializeChart
    
    
    End Sub



    Any ideas?

    OK this has me stumped so I find myself back at Ozgrid.


    A user has came to me with an issue for something which was running smoothly for a long time and now errors on something simple but only on machines with windows 7.


    Basically during code execution it can not delete a row on sheets which are setup for advanced filtering. The code I am using is


    Code
    Range("a5", "i5").AutoFilter Field:=6, Criteria1:="<>" & vaRepData(y, 1), Operator:=xlAnd
    Range("a5").CurrentRegion.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete


    The error is windows can not complete task with available resources.


    If I step into the code and just manually try and do this it fails. If I try and delete just one row it fails. If I select another sheet layed out traditionally it works.


    Anyone experienced this?