Posts by dorian777

    I will note that the loop with image generator disabled still resulted in the same crash...I wonder if there is any tool which can track vba steps which CAUSE CRASHES?

    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why



    nothing works and they don’t know why


    nice moto - hopefully someone can help

    this is an alternative macro to generate images form camera images?


    let me show you the code I am using:


    camera image exporter to png:



    the macro to adjust multiple overlaying excel charts



    macro to loop through the calculating workbook:



    I have another calculation having workbook opened separately it never crashes - therefore I am concluding this can be related to image handling when saving camera images (GdiPlus.dll appears to be related to image handling)...maybe I can just save the whole cell range (which has multiple overlaid images) - without using the camera?

    [xpost][/xpost]


    Hello,


    Excel crashes randomly showing GdiPlus.dll as the reason - when running a loop which saves the camera image as the multiple different png files. Do you think this error can be related to how the macro is taking the image from the camera image and saving it?


    Here is the error message:


    Code
    Problem signature:  Problem Event Name: APPCRASH  Application Name: EXCEL.EXE  Application Version: 14.0.7229.5000  Application Timestamp: 5c46583d  Fault Module Name: GdiPlus.dll  Fault Module Version: 6.1.7601.17514  Fault Module Timestamp: 4ce7b714  Exception Code: c0000005  Exception Offset: 000b06db  OS Version: 6.1.7601.2.1.0.768.2  Locale ID: 1033
    Additional information about the problem:  LCID: 1033  skulcid: 103

    [xpost][/xpost]

    Hello I am using this code to save the worksheet range as the png file..... I am usually able to generate up to 50 images (or 35) 0 doing loop through the data - but then it just gives the above error - VBA Error 1004 - CopyPicture method of Range class failed


    I wonder if anyone can help me with this? thanks a lot!)

    I found this code from here

    https://stackoverflow.com/ques…-line-weights-with-a-loop


    I have trouble understanding when the weight range should match the line range?


    Code
    Sub SetWeights()    Dim Srs As Series    Dim myWeight As Range    Dim £w As Range    Dim j As Long
        Set myWeight = Range("Weights")
        j = 1
        With ActiveSheet        For Each £w In myWeight            If j > ActiveChart.SeriesCollection.Count Then Exit Sub            ActiveChart.SeriesCollection(j).Format.Line.Weight = £w            j = j + 1        Next £w    End With
    End Sub

    thank you for the help Roy. I have attached the line chart with the data and the upper column values which have the line width in pts - currently line width is 2.25 pts for all line charts on the graphs. I need to adjust the line width for 4 lines by taking the values in the upper row:


    Width1 Width2 Width3 Width4
    0.5 1 1.5 2
    Series1 Series2 Series3 Series4
    23 70 98 98
    24 68 101 103
    25 66 104 108
    26 64 107 113
    27 62 110 118
    28 60 113 123
    29 58 116 128
    30 56 119 133
    31 54 122 138
    32 52 125 143
    33 50 128 148
    34 48 131 153
    35 46 134 158
    36 44 137 163
    37 42 140 168
    38 40 143 173
    39 38 146 178
    40 36 149 183
    41 34 152 188
    42 32 155 193
    43 30 158 198
    44 28 161 203
    45 26 164 208
    46 24 167 213
    47 22 170 218

    Hello,

    I have a simple line chart and woudl want to change line color saturation based on a single cell value for each of the lines in the chart. Can this be done in VBA? I also need to change line thickness based on a single cell value for each line . I am using office 2010...


    Any help is gladly accepted)

    David

    IT TURNED OUT the running maximum formula was operating on 20 billion cells at one iteration - the solution was just running the high water mark when it changes - not calculating maximum on all previous cells - now in stead of 20 billion claucltotions the PC has to perform only 250 k - fabulous!

    In essense I need to find HOW STRAIGHT A LINE IS - now matter the slope....can it be done with the simple linest or intercept formulas? I woudl need to create a line and then compare the original curev to this line to see hwo far it digresses from the estimated line - is there a formula for this?

    I think I have run into excel limitations at last. My 32-core PC is finding it hard to calculate the running sum on a 250000 row column and I need to test

    a few parameters which will lead to different values in this column. This running sum is used to create the account trading curve - find maximums on this curve and then subtract and subsequent data point from this maximum to get the drawdown. Now my pc refuses to create this curve due to overload.


    I wonder if there is an alternative way to calculate maximum drawdown on a trading curve?

    For this I need to find the maximum value of the difference between the earlier peak and the active point divided by the peak. Can this be done in a single formula?


    here are some sample data points.


    -18.5
    -28.5
    71.5
    61.5
    51.5
    41.5
    31.5
    31.5
    21.5
    11.5
    1.5
    -8.5
    -18.5
    -28.5
    -38.5
    -48.5
    -58.5
    41.5
    31.5
    21.5
    11.5
    111.5
    101.5
    91.5
    81.5
    181.5
    171.5
    161.5
    151.5
    141.5
    131.5
    121.5
    111.5
    101.5
    91.5
    81.5
    81.5
    71.5
    61.5
    51.5
    41.5
    31.5
    21.5
    11.5
    1.5
    -8.5
    91.5
    81.5
    71.5
    61.5
    161.5
    151.5
    141.5
    131.5
    231.5
    221.5
    211.5
    201.5
    191.5
    181.5
    171.5
    161.5
    151.5
    141.5
    131.5
    131.5
    121.5
    111.5
    101.5
    91.5
    81.5
    71.5
    61.5
    51.5
    41.5
    141.5
    131.5
    121.5
    111.5
    211.5
    311.5
    411.5
    401.5
    501.5
    491.5
    481.5
    471.5
    461.5
    451.5
    441.5
    431.5
    421.5
    411.5
    401.5
    401.5
    391.5
    381.5
    371.5
    361.5
    351.5
    341.5
    331.5
    321.5
    311.5
    301.5
    291.5
    281.5
    271.5
    261.5
    251.5
    241.5
    341.5
    331.5
    321.5
    311.5
    301.5
    291.5
    281.5
    381.5
    371.5
    361.5
    351.5
    341.5
    341.5
    331.5
    321.5
    311.5
    411.5
    401.5
    501.5
    491.5
    481.5
    471.5
    461.5
    451.5
    441.5
    431.5
    421.5
    411.5
    401.5
    391.5
    381.5
    371.5
    361.5
    351.5
    341.5
    331.5
    431.5
    421.5
    411.5
    401.5
    391.5
    391.5
    381.5
    371.5
    361.5
    461.5
    451.5
    441.5
    431.5
    421.5
    411.5
    401.5
    391.5
    491.5
    481.5
    471.5
    461.5
    451.5
    441.5
    431.5
    531.5
    521.5
    511.5
    501.5
    491.5
    591.5
    581.5
    571.5
    561.5
    551.5
    551.5
    541.5
    531.5
    521.5
    621.5
    611.5
    601.5
    591.5
    581.5
    571.5
    561.5
    551.5
    541.5
    531.5
    631.5
    621.5
    611.5
    601.5
    701.5

    You can add an InputBox asking the user to the select the Range or type the range in a cell, but I would never use that method.


    How is the range changing?

    Thank you Roy - the range will be chanign dynamically from 28 to 1 rows (16000 columns per row)....I will generate range dimensions via formula and place then into a cell.....this can be used as dynamic range?