If Selection.RowHeight = 0 Then turned = True: Exit For Next
If turned Then
' ActiveSheet.UsedRange.RowHeight = 15.75
Range(Cells(forstRow, 1), Cells(ActiveSheet.UsedRange.Rows.Count, 10)).RowHeight = 15.75 Else
Range(Cells(forstRow, 1), Cells(ActiveSheet.UsedRange.Rows.Count, 10)).RowHeight = 0 For i = forstRow To ActiveSheet.UsedRange.Rows.Count
If Cells(i, 2) = \15.75 Next End If
Excel.Application.ScreenUpdating = True End ERR:
Excel.Application.ScreenUpdating = True End Sub
Public Sub Submit() On Error Resume Next
Application.ScreenUpdating = False
Dim sngInc As Single, sngEnd As Single '起点里程、终点里程
Dim strCaption As String, strFootnote As String '表格标题,表格脚注 Dim i As Integer '
sngInc = Cells(3, 2) sngEnd = Cells(4, 2)
strCaption = Cells(1, 2) & Cells(2, 3) & MileageString(sngInc) & \strFootnote = \测量:\ 计算:\Cells(7, 2)
intPubSpace = Cells(9, 2) '测点间隔 'ActiveSheet.Shapes(\'Selection.Delete
'Range(\
Sheets.Add , Sheets(Sheets.Count)
ActiveSheet.Name = strCaption
Cells.HorizontalAlignment = xlCenter Cells.VerticalAlignment = xlCenter
Cells(4, 1).Activate: ActiveWindow.FreezePanes = True '设置前3行为冻结行 Range(\Range(\Range(\With Cells(1, 1).Font .Size = 12
.Name = \黑体\End With
Range(\测点里程\测点说明\后视\前视\轨面\\路肩\桩顶\轨面\路肩\桩顶\
Range(\转点(mm)\读数(mm)\标高(m)\Range(\Range(\
Range(\Range(\Range(\With Range(\
第16页共18页
.Font.Name = \楷体_GB2312\ .Font.Bold = False
.Borders.LineStyle = xlContinuous
.Borders(xlEdgeTop).Weight = xlMedium .Borders(xlEdgeRight).Weight = xlMedium .RowHeight = 15 End With
With Columns(1)
.ColumnWidth = 8
.HorizontalAlignment = xlLeft End With
With Columns(2)
.HorizontalAlignment = xlLeft .ColumnWidth = 11 End With
Range(\'设置表格的页眉与脚注 With ActiveSheet.PageSetup .PrintTitleRows = \ .LeftHeader = \
.LeftFooter = strFootnote
.HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.5)
.CenterHeader = \宋体,加粗\第&P页,共&N页\' .LeftMargin = Application.InchesToPoints()
.RightMargin = Application.InchesToPoints(0.44) .TopMargin = Application.InchesToPoints(0.8) .BottomMargin = Application.InchesToPoints(0.8) .CenterHorizontally = True .Orientation = xlPortrait .Draft = False
.PaperSize = xlPaperA4 .Order = xlDownThenOver .Zoom = 100 End With
'填充点号
Cells(4, 2).Value = \'确定起点里程
If sngInc * 1000 Mod intPubSpace <> 0 Then sngInc = (sngInc * 1000 \\ intPubSpace) * intPubSpace: sngInc = sngInc / 1000
If sngEnd * 1000 Mod intPubSpace <> 0 Then sngEnd = (sngEnd * 1000 \\ intPubSpace) * intPubSpace: sngEnd = sngEnd / 1000
If sngInc > sngEnd Then intPubSpace = -intPubSpace
For i = 0 To Abs(sngEnd - sngInc) * 1000 / Abs(intPubSpace)
If sngInc = 0 And i = 0 Then Cells(5 + i, 1) = 0 Else Cells(5 + i, 1) = Format(sngInc + i * intPubSpace / 1000, \Next
Cells(5 + i, 2) = \While i >= 0
Cells(5 + i, 2) = Format((Cells(5 + i, 1) * 1000 Mod 1000) / 50, \ Cells(5 + i, 2) = replace(Cells(5 + i, 2), \' Cells(5 + i, 2) = replace(Cells(5 + i, 2), \
Cells(5 + i, 2).Characters(Len(Cells(5 + i, 2).Text) - 1, 1).Font.superScript = True Cells(5 + i, 2).Characters(Len(Cells(5 + i, 2).Text), 0).Font.superScript = False i = i - 1 Wend
第17页共18页
ActiveSheet.Cells(4, 3).Activate 'ActiveSheet.UsedRange.Select Application.ScreenUpdating = True 'ActiveWorkbook. End Sub
第18页共18页