I get 0 for every blank and 0. Furthermore, when I useI get blanks for every blank and 0. What is the easiest way to ensure that the cell shows what the parent actually is?
VB:ReplicateCharts() Dim Cht As Chart Dim NewCht As Chart Dim ChtObj, NewChtobj As ChartObject Dim SrSerie As Series Dim ns As Series Dim x As Variant If ActiveWorkbook.Charts.Count > 0 Then For Each Cht In .Charts Set NewCht = .Charts.Add() NewCht.PageSetup.Orientation = Cht.PageSetup.Orientation For Each ChtObj In Cht.ChartObjects For Each SrSerie In ChtObj.Chart.SeriesCollection Set NewChtobj = NewCht.ChartObjects.Add (ChtObj.Left, ChtObj.Top, ChtObj.Width, ChtObj.Height) Set ns = NewChtobj.Chart.SeriesCollection.NewSeries ns.Name = SrSerie.Name [I][COLOR=red]ns.XValues = SrSerie.XValues this Is were i get error[/COLOR][/I][COLOR=red] [I]ns.Values= SrSerie.Values[/I][/COLOR] Next SrSerie Next ChtObj Next Cht End With End If End SubIf you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Code:If Range("b3") = 0 Then Range("b2").EntireRow.DeleteBoth ended up deleting row 2, when it shouldn't have been deleted bacause row 3 was blank.
I'm sure this is really a dumb question that's been answered a bunch of times before, but I can't seem to figure out how to search for it, since zero and blank appear in so many posts...
Private Sub Correct_The_File(src_filename_and_path As String, dest_filename_and_path As String) Dim temp_string As String Dim filebytes() As Byte Dim byteindex As Long Dim maxbytes As Long On Error Resume Next Open src_filename_and_path For Binary As #1 ReDim filebytes(LOF(1) - 1) Get #1, , filebytes Close On Error GoTo 0 ' Remove the characters you don't want (actually we will replace with a space to keep your fixed width formating correct) maxbytes = UBound(filebytes) For byteindex = 0 To maxbytes - 1 ' Don't bother with the last byte as it will have no effect anyway If filebytes(byteindex) = CR And filebytes(byteindex + 1) <> LF Then ' All CR should be followed by a LF, otherwise they are faulty data filebytes(byteindex) = SPACE_CHR End If Next byteindex 'temp_string now contains the whole text file, write it back to a file Open dest_filename_and_path For Binary As #1 Put #1, , filebytes Close End SubAny help is appreciated.
In A5 thru A150 will be a date, is there a way to have D3 reset to 0 and start counting again once the date is not the same as the cell above?
Is there then a way to capture the number in D3 prior to it reseting to 0 ?