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) =...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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
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.
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.