Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: dnky
  • Order by date
  1. dnky

    "Syntax Error" on Redim of sub of jagged array (Excel XP)

    Combo, good point. Didn't think of that. In the end I wrote a little function: Private Function ReDimSub(subArray As Variant, newUBound As Integer) ReDim Preserve subArray(LBound(subArray) To newUBound) ReDimSub = subArray End Function To be used like so: mainArray(1) =...
  2. dnky

    "Syntax Error" on Redim of sub of jagged array (Excel XP)

    For now I'm using a temporary array. i.e.: ReDim tempArray(1 to 6) For x = 1 To UBound(mainArray(1)) tempArray(x) = mainArray(1)(x) Next x mainArray(1) = tempArray But it requires a lot of code so I would still like to know if there is a way of doing it with ReDim.
  3. dnky

    "Syntax Error" on Redim of sub of jagged array (Excel XP)

    Yes. Let me try again because I think you're missing the point. Dim mainArray() As Variant Dim subArray() As Variant ReDim mainArray(1 To 3) ReDim subArray(1 To 5) mainArray(1) = subArray ReDim subArray(1 To 3) mainArray(2) = subArray ReDim subArray(1 To 7) mainArray(3) = subArray Now...
  4. dnky

    "Syntax Error" on Redim of sub of jagged array (Excel XP)

    SkipVought, I appreciate the response but it doesn't seem to have done it. If I: ReDim subArray(6) I still get: UBound(mainArray(1)) = 5 I need: UBound(mainArray(1)) = 6 without losing the data in mainArray(1) PHV, I'm not aware of Collections/Scripting.Dictionary objects so I'll take a...
  5. dnky

    "Syntax Error" on Redim of sub of jagged array (Excel XP)

    I need some help and I can't find the answer elsewhere on here or anywhere. I'm using jagged arrays to store information, I declared it as so: Dim mainArray() As Variant, subArray() As Variant ... Redim mainArray(1 To 5) Redim subArray(1 To 5) mainArray(1) = subArray ... and later when I need...
  6. dnky

    Excel VBA - crazy re-re-re-recalculating during save

    This morning it seems a bit more obvious. The cells in the range are not just values but formulas and it would make sense that as each cell in the range has its formula recalculated it is then triggering the function to recalculate also - i.e. if the function is focused on 1000 cells containing...
  7. dnky

    Excel VBA - crazy re-re-re-recalculating during save

    I've written a function which takes a range of usually a few thousand cells, puts them in an array, sorts them and finds a particular located cell and returns that value. The sorting takes a moment to complete so the calculation usually takes approx a second. Then I noticed that automatic...
  8. dnky

    Powerpoint - Macro to run custom show - Not Working

    I wish I could edit my posts... I'm still stuck on this and have been for ages. I just need to recreate the powerpoint "link to custom show" action. i.e. the method of running a custom show and then returning to the original show once finished. I can link to the original show as shown above...
  9. dnky

    Powerpoint - Macro to run custom show - Not Working

    Dammit! As always just after i post i read the code and spot the answer. The "style" syntax was wrong. :( Anyway here's what it should have been. One question thou, how come it doesnt start a new slideshow? Sub MenuButton(oShape As Shape) showName = oShape.Name...
  10. dnky

    Powerpoint - Macro to run custom show - Not Working

    I've got a "menu" slide with all the custom shows assigned to buttons. I need to style the buttons as "visited" once clicked but I can't assign a link AND a macro to a button so I'm trying to get the macro to run the custom show. Here;s what i have (the shape name is the same as the show...
  11. dnky

    Crop the number of characters in a text string

    Works perfectly thanks. Is there anyway I could trim it at a point where there's a line break too. Or just remove any line breaks?
  12. dnky

    Crop the number of characters in a text string

    I'm trying to set up a macro to make custom shows in Powerpoint based on the title slides, the problem is custom show names have a limit of 32 characters. So if the title string variable contains more than 32 characters, how do I chop off the end. thank you
  13. dnky

    using raster images with transparency - screws up on export

    I worked it out. It exports fine when the raster image is at 100% scale. So i just scaled it down in an external program and imported it at 100% scale and its sorted.
  14. dnky

    using raster images with transparency - screws up on export

    When i use a raster image with transparency in Freehand (i.e. an imported PNG), the vector objects beind the image's transparent area have no anti-aliasing applied when exported to a single layer image. The only time they do anti-alias is behind any raster effects - but the raster effects screw...
  15. dnky

    making a simple quiz in powerpoint

    Hello, in the end i used a text file to store the count. I made a seperate page for each question and set each page so that you could only continue by pressing one of the buttons (i.e. no advance slide setting) then i made 4 macros. One to start the quiz, one for a right answer, one for a...
  16. dnky

    making Excel graph splitter - need to extract info from series formula

    That's a very good point MichaelRed. My main use of excel is doing data analysis of noise readings as a junior in an environmental health consultancy. I've only begun to explore replacing years of repetetive tasks of graph making with macros... and i've had a great deal of luck mostly thanks to...
  17. dnky

    making Excel graph splitter - need to extract info from series formula

    thats brilliant i'd never seen the InStr and Mid statements before. (and i didn't know you could use .FormulaR1C1) - there's only so much you can learn from recording macros and looking at the code. all i had to do was change the "," to a ":" for the end row number and now...
  18. dnky

    making Excel graph splitter - need to extract info from series formula

    p.s. in answer to your question (doh!!): i'd like to take the values from the series formula that's already there. The graph exists already so can i extract these values from it? e.g. series formula "=SERIES(Data!$B$1,Data!$A$2:$A$7939,Data!$B$2:$B$7939,1)" ...can i extract the...
  19. dnky

    making Excel graph splitter - need to extract info from series formula

    sorry i wrote that last night after brainstorming on it for hours. rereading it this morning i realised it didn't make sense because i typed it in instead of just copying the code directly. so here's what i have so far.... Sub FocusedChartSplitter() Dim chartname As String Dim...
  20. dnky

    making Excel graph splitter - need to extract info from series formula

    Hi everybody, i'm a novice trying to write a macro for a simple graph splitter. Just one that takes the graph you're looking at and divides it up into smaller ranges. Currently i have it working on a simple loop. The problem is you have to manually input the start and end row numbers. Also...

Part and Inventory Search

Back
Top