Just needed to delete a lot of charts. I'm generating some as well and all the practice charts are building up.
********************************
For i = 1 To ActiveSheet.ChartObjects.Count 'Cycle through the Charts
ActiveSheet.ChartObjects(i).Delete ' Delete each Chart
Next i 'NEXT CHART
**********************************
The bulk of the code is in this loop. Surrounding code is pretty easy
Showing posts with label vba excel. Show all posts
Showing posts with label vba excel. Show all posts
Tuesday, May 26, 2009
Tuesday, April 28, 2009
VBA Replace Method
I've been using the Replace method a lot lately. Wanted to get it up and front. The first time I used it, I found someone who had re-programmed it -- so I have some useless code in one of my projects.
Instead of doing a big writeup, here are examples from
------ CODE -------
Replace("alphabet", "bet", "hydro") would return "alphahydro"
Replace ("alphabet", "a", "e") would return "elphebet"
Replace("alphabet", "a", "e", 2) would return "lphebet"
Replace("alphabet", "a", "e", 1, 1) would return "elphabet"
---- END CODE
Subscribe to:
Posts (Atom)