Excel工作表运行时错误13:types不匹配。

Sub Reset_Bet() Application.ScreenUpdating = False Sheets("Bet Angel").Select Range( _ "O6,O9,O11,O13,O15,O17,O19,O21,O23,O25,O27,O29,O31,O33,O35,O37,O39,O41,O43,O45,O47,O49,O51,O53,O55,O57,O59,O61,O63,O65,O67").Activate Selection.ClearContents Range("H2").Select Sheets("Dashboard").Select Range("D1").Select Worksheets("Dashboard").Range("A26") = 0 Application.ScreenUpdating = True End Sub Sub TIME_CHECK() If Worksheets("Dashboard").Range("A26") >= Worksheets("Dashboard").Range("L19") Then Call Reset_Bet If Worksheets("Dashboard").Range("A27") >= Worksheets("Dashboard").Range("L20") Then Range("A27") = 0 End Sub Sub TIMEODD() Worksheets("Dashboard").Range("a25") = 1 **Worksheets("Dashboard").Range("A26") = Range("A26") + 1** Worksheets("Dashboard").Range("A27") = Range("A27") + 1 Call TIME_CHECK End Sub Sub TIMEEVEN() Worksheets("Dashboard").Range("a25") = 0 Worksheets("Dashboard").Range("A26") = Range("A26") + 1 Worksheets("Dashboard").Range("A27") = Range("A27") + 1 Call TIME_CHECK End Sub Public Sub arrRecorder() Dim ws As Worksheet Set ws = Worksheets("Recorder") ' Excel 2003 only has 65536 rows Dim maxRows As Long maxRows = 65536 ' This value must not be more than the number of rows allowed in Excel ' Clear data after selecting a new market, if that option is ticked If (ws.Range("A4").Value <> ws.Range("A7").Value) And ws.Range("A7").Value <> "" And ws.Range("D1").Value = True Then Module1.Clear_Data End If ' Check whether logging is enabled If (ws.Range("D2") = True) Then Application.ScreenUpdating = False ' Find the last used row Dim lastRow As Long lastUsedRow = ws.Cells.SpecialCells(xlCellTypeLastCell).Row 'Find the last column Dim lastUsedColumn As Long lastUsedColumn = ws.Cells.SpecialCells(xlCellTypeLastCell).Column ' Clear the last used row, so that there is not an error if we try to move data down beyond the last row ' Deleting a row is not super fast, so we only do it if necessary. ' So we do not bother to delete the last used row unless it is near the end of the spreadsheet ' This also ensures that we never accidentally delete our top row containing formulae. If lastUsedRow >= maxRows Then ' Now delete cells in the last used row (across as far as the lastUsedColumn) ws.Range(ws.Cells(lastUsedRow, 1), ws.Cells(lastUsedRow, lastUsedColumn)).Delete End If ' Now move all the data down by one row, by inserting a row ws.Range(ws.Cells(5, 1), ws.Cells(5, lastUsedColumn)).Insert shift:=xlDown Dim arr As Variant 'arr = ws.Range("A3:AF3") arr = ws.Range(ws.Cells(4, 1), ws.Cells(4, lastUsedColumn)) Dim destination As Range Set destination = ws.Range("A7") destination.Resize(UBound(arr, 1), UBound(arr, 2)).Value = arr ' Other ways to copy the data: 'ws.Range("A7:AF5").Value = arr 'ws.Range("A7:AF5").Value = ws.Range("A4:AF3").Value 'ws.Range("A7:AF5").Copy destination: ws.Range ("A4:AF3") Application.ScreenUpdating = True End If End Sub Sub Clear_Data() Dim ws As Worksheet Set ws = Worksheets("Recorder") 'ws.Range("A5:AF65536").delete shift:=xlUp Dim lastDataColumn As Long lastDataColumn = ws.Cells.SpecialCells(xlCellTypeLastCell).Column ws.Range(ws.Cells(7, 1), ws.Cells(65536, lastDataColumn)).Clear End Sub Sub NotActive() Dim ws As Worksheet Set ws = Worksheets("Recorder") ' Just log it once that the market is not active (ie Suspended or Closed) ' There is no need to log it more than once, because prices don't change when the market is not active If ws.Range("D4") <> ws.Range("D7") Then Call arrRecorder End If End Sub 

我试图logging下注赔率,并在logging表中,并试图将投注自动放置在仪表板上。 logging器工作正常,但它不显示赔率在其他页上,无论我链接他们。 其次,当我开始工作表,它给我一个错误的运行时错误“13”:TypeMismatch。 (“A26”)=范围(“A26”)+ 1“当我点击debugging它需要我到这行”工作表(“仪表板”

请帮帮我。

喜欢这个:

 Sub TIMEODD() With Worksheets("Dashboard") .Range("a25") = 1 .Range("A26") = .Range("A26") + 1 .Range("A27") = .Range("A27") + 1 End With Call TIME_CHECK End Sub