0

ファイルを開いたときに実行されるマクロを作成し、range("a1").select でマクロを終了しました。問題は、マクロを何で終了しても、つまり. スクロール、選択、アクティブ、ファイルを開いてマクロの実行を終了すると、選択されたセルは A8 になります。A8 は、複数の列にわたってセルが結合された行のすぐ下にあります。これが原因かどうかはわかりません。助けてください!

コード:

Sub Macro1()

'
    Rows("6:6").Select
    Selection.Insert Shift:=xlDown
    Range("B7:O8").Select
    Selection.ClearContents
    Range("B6:H8").Select

    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    Range("B6:H6").Select
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    Range("B7:B8,E7:E8").Select
        With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    Range("C7:C8,F7:F8").Select

    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    Range("D7:E7,G7:H7").Select


    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    Range("B6").Select
    With Selection.Font
        .Size = 14
    End With
    ActiveCell.FormulaR1C1 = "Current Period"
    Range("B6:H6").Select
    With Selection
        .HorizontalAlignment = xlCenterAcrossSelection
           End With
    Range("B8").Select
    ActiveCell.FormulaR1C1 = "Actual"
    Range("B8").Select
    With Selection
        .HorizontalAlignment = xlCenter

    End With
    With Selection.Font
        .Name = "Helvetica"
        .Size = 12
    End With
    Range("C8").Select
    With Selection.Font
        .Name = "Helvetica"
        .Size = 12
    End With
    With Selection
        .HorizontalAlignment = xlCenter

    End With
    ActiveCell.FormulaR1C1 = "Budget"
    Rows("8:8").Select
    With Selection
        .HorizontalAlignment = xlCenter

    End With
    Range("D8").Select
    ActiveCell.FormulaR1C1 = "$"
    Range("E8").Select
    ActiveCell.FormulaR1C1 = "%"
    Range("D7:E8").Select
    Range("D8").Activate
    With Selection.Font
        .Name = "Helvetica"
        .Size = 10
    End With
    Range("F8").Select
    With Selection.Font
        .Name = "Helvetica"
        .Size = 12
    End With
    ActiveCell.FormulaR1C1 = "Last Year"
    Range("G7:H8").Select
    Range("G8").Activate
    ActiveCell.FormulaR1C1 = "$"
    With Selection.Font
        .Name = "Helvetica"
        .Size = 10
    End With

    Range("H8").Select
    ActiveCell.FormulaR1C1 = "%"
    Range("D7").Select
    ActiveCell.FormulaR1C1 = "B/(W) Than Budget"
    Range("D7:E7").Select
    With Selection
        .HorizontalAlignment = xlCenterAcrossSelection

    End With
    Range("G7:H7").Select
    With Selection
        .HorizontalAlignment = xlCenterAcrossSelection

    End With
    ActiveCell.FormulaR1C1 = "B/(W) Than Last Year"
    Range("B6:H8").Select
    Selection.Copy
    Range("I6").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Range("I6").Select
    ActiveCell.FormulaR1C1 = "Year To Date"
    Rows("1:4").Select
    With Selection.Font
        .Size = 14
    End With
    Rows("9:138").Select
    With Selection.Font
        .Size = 10
    End With
    Rows("125:125").Select
    Selection.ClearContents
    Rows("133:133").Select
    Selection.ClearContents
    Range("B:D,F:G,I:K,M1,M:N").Select
    Range("M1").Activate
    Selection.ColumnWidth = 15
    Range("E:E,h:h,l:l,o:o").Select
    Selection.ColumnWidth = 12
    Range("A:A").Select
    Selection.ColumnWidth = 40
    With ActiveSheet.PageSetup
        .PrintTitleRows = "$1:$8"
    End With


Rows("6:6").Select
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown
Selection.Insert Shift:=xlDown


Columns("i:i").Select
Selection.Insert Shift:=xlRight

Range("g14:i14").Select
With Selection
.HorizontalAlignment = xlLeft
End With

Range("g14:h14").Select
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With
Range("b13:i13").Select
With Selection
.HorizontalAlignment = xlLeft
End With

Range("b13:h13").Select
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With

Range("k16:k200").Select
Selection.Copy
Range("i16:i200").Select
Selection.PasteSpecial Paste:=xlPasteFormats

Range("i:i,q:q").Select
Selection.ColumnWidth = 38
With Selection
.WrapText = True
End With

Range("i13").Select
Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone


Range("i16").Select
With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlHairline
        .ColorIndex = xlAutomatic
    End With
Range("i17").Select
With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlHairline
        .ColorIndex = xlAutomatic
    End With

Selection.Copy
Range("i17:i200,q16:q200").Select
ActiveSheet.Paste

Range("i14").Select
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
ActiveCell.FormulaR1C1 = "Describe Variance"
With Selection
.HorizontalAlignment = xlCenter
End With
Selection.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "to CP Budget"
With Selection
.HorizontalAlignment = xlCenter
End With
Range("i14:i15").Select
Selection.Copy
Range("q14:q15").Select
Selection.PasteSpecial Paste:=xlPasteFormats

Range("q14").Select
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
ActiveCell.FormulaR1C1 = "Describe Variance"
With Selection
.HorizontalAlignment = xlCenter
End With
Selection.Offset(1, 0).Select
ActiveCell.FormulaR1C1 = "to YTD Budget"
With Selection
.HorizontalAlignment = xlCenter
End With


Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(2, 0).Select
Range(ActiveCell, ActiveCell.Offset(200, 0)).Select
Selection.EntireRow.Delete

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(3, 0).Select
ActiveCell = "Explanation of EBITDA Variance to Budget (Only required if variance exceeded the acceptable range for your group)"
Range(ActiveCell, ActiveCell.Offset(0, 16)).Select
With Selection.Font
        .Size = 14
        .Bold = True
    End With
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With
Selection.Offset(1, 0).Select
Range(ActiveCell, ActiveCell.Offset(0, 16)).Select
Selection.Merge
Selection.RowHeight = 50
With Selection.Font
        .Size = 10
         .Bold = True
    End With


    With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With
 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

Range("a1:q11").Select
With Selection
.HorizontalAlignment = xlLeft
End With

With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With


Range("a6").Select
ActiveCell = "Publisher's Summary"
With Selection.Font
        .Size = 14
    End With
Range("a9").Select
ActiveCell = "Market Outlook"
With Selection.Font
        .Size = 14
    End With



Rows("10:10").Select
Selection.RowHeight = 70
Range("a10:q10").Select
Selection.Merge
 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
        With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With

    With ActiveSheet.PageSetup
        .RightHeader = "&9Page &P of &N"
        .LeftMargin = Application.InchesToPoints(0.25)
        .RightMargin = Application.InchesToPoints(0.25)
        .TopMargin = Application.InchesToPoints(0.25)
        .BottomMargin = Application.InchesToPoints(0.25)
        .HeaderMargin = Application.InchesToPoints(0.1)
        .FooterMargin = Application.InchesToPoints(0.15)
        .CenterHorizontally = True
        .Orientation = xlLandscape
        .FitToPagesWide = 1
          .FitToPagesTall = 2
        .Zoom = False
    End With


    ActiveWindow.Zoom = 70


Rows("7:7").Select
Selection.RowHeight = 180
Range("a7:q7").Select
Selection.Merge
 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With

'

Cells.Select

With Selection

.Locked = False
End With

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(1, 1).Select

Range(ActiveCell, "h13").Select

With Selection

.Locked = True
End With

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(1, 9).Select

Range(ActiveCell, "p13").Select

With Selection

.Locked = True
End With




Range("a1").Select


ActiveSheet.Protect userinterfaceonly:=True


ActiveWindow.FreezePanes = False

End Sub
4

3 に答える 3

1
Range("a1").Select

ActiveSheet.Protect userinterfaceonly:=True

A1 はロックされたセルであると思われるため、ワークシートを保護すると、ロックされていない最も近い使用可能なセルにジャンプします (ロックされたセルの選択を許可するオプションが最後の使用からチェックされていないと仮定します)。

于 2013-07-31T14:46:43.130 に答える
0

マクロがシート間をジャンプしている場合、選択時に間違ったシートで動作する可能性があります。選択を次のように変更してみてください。

Worksheets("sheetname").Range("A1").Select
于 2013-07-31T14:51:07.087 に答える
0

すべての .select ステートメント (またはできる限り) を取り除くことから始めるべきです。これが明示的な答えではないことはわかっていますが、コメントに入れるには多すぎます。コード内の .Select を取り除くことで問題が解決すると信じていますが、すべてを整理するには少し手間がかかります。それにもかかわらず、ここから始めましょう。

Option Explicit

Sub Macro1()

Application.ScreenUpdating = False
'
    Rows("6:6").Insert Shift:=xlDown
    Range("B7:O8").ClearContents

    With Range("B6:H8").Borders
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Range("B6:H6").Borders
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    With Range("B7:B8,E7:E8").Borders
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With


    With Range("C7:C8,F7:F8").Borders
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    With Range("D7:E7,G7:H7").Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

    With Range("B6").Font
        .Size = 14
    End With
    Range("B6").FormulaR1C1 = "Current Period"
    Range("B6:H6").HorizontalAlignment = xlCenterAcrossSelection

    Range("B8").FormulaR1C1 = "Actual"
    Range("B8").HorizontalAlignment = xlCenter


    With Range("B8").Font
        .Name = "Helvetica"
        .Size = 12
    End With

    With Range("C8").Font
        .Name = "Helvetica"
        .Size = 12
    End With

    Range("C8").HorizontalAlignment = xlCenter

    ActiveCell.FormulaR1C1 = "Budget"
    Rows("8:8").Select
    With Selection
        .HorizontalAlignment = xlCenter

    End With
    Range("D8").FormulaR1C1 = "$"
    Range("E8").FormulaR1C1 = "%"

    With Range("D7:E8").Font
        .Name = "Helvetica"
        .Size = 10
    End With

    With Range("F8").Font
        .Name = "Helvetica"
        .Size = 12
    End With

    Range("F8").FormulaR1C1 = "Last Year"
        Range("G8").FormulaR1C1 = "$"
    With Range("G7:H8").Font
        .Name = "Helvetica"
        .Size = 10
    End With

    Range("H8").FormulaR1C1 = "%"
    Range("D7").FormulaR1C1 = "B/(W) Than Budget"
    Range("D7:E7").HorizontalAlignment = xlCenterAcrossSelection


    Range("G7:H7").HorizontalAlignment = xlCenterAcrossSelection

    Range("G7").FormulaR1C1 = "B/(W) Than Last Year"
    Range("B6:H8").Copy Range("I6")
    Range("I6").FormulaR1C1 = "Year To Date"
    With Rows("1:4").Font
        .Size = 14
    End With

    With Rows("9:138").Font
        .Size = 10
    End With

    Rows("125:125").ClearContents
    Rows("133:133").ClearContents
    Range("B:D,F:G,I:K,M1,M:N").ColumnWidth = 15
    Range("E:E,h:h,l:l,o:o").ColumnWidth = 12
    Range("A:A").ColumnWidth = 40
    With ActiveSheet.PageSetup
        .PrintTitleRows = "$1:$8"
    End With


Rows("6:12").Insert Shift:=xlDown

Columns("i:i").Insert Shift:=xlRight

Range("g14:i14").HorizontalAlignment = xlLeft


Range("g14:h14").HorizontalAlignment = xlCenterAcrossSelection

Range("b13:i13").HorizontalAlignment = xlLeft

Range("b13:h13").HorizontalAlignment = xlCenterAcrossSelection


Range("k16:k200").Copy
Range("i16:i200").PasteSpecial Paste:=xlPasteFormats

Range("i:i,q:q").ColumnWidth = 38
Range("i:i,q:q").WrapText = True



Range("i13").Borders(xlEdgeTop).LineStyle = xlNone
Range("i13").Borders(xlEdgeBottom).LineStyle = xlNone


With Range("i16").Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlHairline
        .ColorIndex = xlAutomatic
    End With

With Range("i17").Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlHairline
        .ColorIndex = xlAutomatic
    End With

Range("i17").Copy Range("i17:i200", "q16:q200")
    With Range("i14").Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With

Range("i14").FormulaR1C1 = "Describe Variance"

Range("i14").HorizontalAlignment = xlCenter

Range("i14").Offset(1, 0).FormulaR1C1 = "to CP Budget"

Range("i14").Offset(1, 0).HorizontalAlignment = xlCenter

Range("i14:i15").Copy
Range("q14:q15").PasteSpecial Paste:=xlPasteFormats


With Range("q14").Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
End With
Range("q14").FormulaR1C1 = "Describe Variance"
Range("q14").HorizontalAlignment = xlCenter

Range("q14").Offset(1, 0).FormulaR1C1 = "to YTD Budget"

Range("q14").Offset(1, 0).HorizontalAlignment = xlCenter



'''''''''''
'  Stopped here
'''''''''''


Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(2, 0).Select
Range(ActiveCell, ActiveCell.Offset(200, 0)).Select
Selection.EntireRow.Delete

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(3, 0).Select
ActiveCell = "Explanation of EBITDA Variance to Budget (Only required if variance exceeded the acceptable range for your group)"
Range(ActiveCell, ActiveCell.Offset(0, 16)).Select

With Selection.Font
        .Size = 14
        .Bold = True
    End With
With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With

Selection.Offset(1, 0).Select
Range(ActiveCell, ActiveCell.Offset(0, 16)).Select
Selection.Merge
Selection.RowHeight = 50
With Selection.Font
        .Size = 10
         .Bold = True
End With


    With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With

 With Selection.Borders
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
 End With

Range("a1:q11").Select
With Selection
.HorizontalAlignment = xlLeft
End With

With Selection
.HorizontalAlignment = xlCenterAcrossSelection
End With


Range("a6").Select
ActiveCell = "Publisher's Summary"
With Selection.Font
        .Size = 14
    End With
Range("a9").Select
ActiveCell = "Market Outlook"
With Selection.Font
        .Size = 14
    End With



Rows("10:10").Select
Selection.RowHeight = 70
Range("a10:q10").Select
Selection.Merge
 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
        With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With

    With ActiveSheet.PageSetup
        .RightHeader = "&9Page &P of &N"
        .LeftMargin = Application.InchesToPoints(0.25)
        .RightMargin = Application.InchesToPoints(0.25)
        .TopMargin = Application.InchesToPoints(0.25)
        .BottomMargin = Application.InchesToPoints(0.25)
        .HeaderMargin = Application.InchesToPoints(0.1)
        .FooterMargin = Application.InchesToPoints(0.15)
        .CenterHorizontally = True
        .Orientation = xlLandscape
        .FitToPagesWide = 1
          .FitToPagesTall = 2
        .Zoom = False
    End With


    ActiveWindow.Zoom = 70


Rows("7:7").Select
Selection.RowHeight = 180
Range("a7:q7").Select
Selection.Merge
 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .Weight = xlMedium
        .ColorIndex = xlAutomatic
    End With
    With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.WrapText = True
End With


Cells.Select

With Selection

.Locked = False
End With

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(1, 1).Select

Range(ActiveCell, "h13").Select

With Selection

.Locked = True
End With

Cells.Find("ebitda", lookat:=xlWhole).Select
Selection.Offset(1, 9).Select

Range(ActiveCell, "p13").Select

With Selection

.Locked = True
End With




Range("a1").Select


ActiveSheet.Protect userinterfaceonly:=True


ActiveWindow.FreezePanes = False

Application.ScreenUpdating = True

End Sub

マクロの実行速度が大幅に向上し、デバッグがはるかに簡単になることがわかります。私はそこから始めます。うまくいけば、私が上に投稿したコードを取得して、コードの変更を終了できることを願っています。停止した場所にコメント ブロックを入れました。それが完了すると、問題が完全に解消されることに気付くかもしれません (開始するものを何も選択していないため)。それでも問題が解決しない場合でも、解決するのははるかに簡単です。

それが少なくとも私の答えであり、あなたが正しい道を進むのに役立つことを願っています!

于 2013-07-31T15:12:52.113 に答える