Laserfiche WebLink
<br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br />I <br /> <br />8.0 Appendices <br />12.2 Appendix A-Data Analysis <br /> <br />Microsoft Visual Basic Macro used to separate the raw GPS data into individual cross section <br />files. For this program to work. the description for each point in a cross section must be <br />identical. with each cross section having a unique description. and located in column "E", Row <br />"\" must also contain the header infonnation. The program first separates the data into <br />different files. one for each cross-section. and then saves those files as lab delimited text files <br />with the description as the file name. <br /> <br />Sub AutoSeparatcO <br /> <br />ActiveCeII.SpeciaICells(xICeIlTypeLastCell).OlTset( I, O).FonnulaR ICI = "End" <br />headcrrow = Rows("): I ").Fonnula <br />Range("E2").Activate <br />Description = ActiveCell.FonnulaR 1 C I <br />Do <br />ActiveCcll.Offset( 1. O).Activate <br />description2 = ActiveCell. FonnulaR I C I <br />If description2 = "End" Then <br />ActiveCell.EntireRow.Delete <br />Exit Do <br />End If <br />If Not description2 = Description Then <br />Range(ActiveCe II. Offset(O, -4). ActiveCell.S pecialCells( xlCe IITypeLastCell) ).CUl <br />Description = description2 <br />Workbooks. Add <br />Rows(" I: I ").Fonnula = headerrow <br />Range(" A2").Activate <br />ActiveSheet.Paste <br />Range("E2").Activate <br />End If <br />Loop <br /> <br />Do <br />Xsname = Range("E2").FonnulaRICI <br />If Xsnamc = "" Then <br />Exit Do <br />End If <br />ActiveWorkbook.SaveAs Filename:=Xsname. FileFonnal:=xIText <br />ActiveWorkbook.Close (False) <br />Loop <br /> <br />End Sub <br /> <br />32 <br />