我正在使用以下代码,
Sub chk()
Dim x As Variant
Select Case StrPtr(x)
Case 0
Exit Sub
Case Else
Dim d As Integer
Dim y As Integer
Dim ws As Object
Set ws = Worksheets(1)
d = InputBox("enter the integer")
For y = 1 To 10
ws.Cells(y, 1) = y * d
Next y
ActiveSheet.Name = d
ActiveWorkbook.Sheets.Add after:=Worksheets(3)
Set ws = Nothing
End Select
End Sub