改成
With Tables("彩piao数据") Dim r As Integer r = .findrow("日期 = #" & Date.Today & "#") If r < 0 Then '如果找到符合条件的行 Functions.Execute("增加当天期数") Functions.Execute("增加5星胆当天期号") For Each dt As DataTable In DataTables dt.Save() Next End IfEnd With