Option Explicit

Sub q1()

Dim MonClasseur As Workbook
Dim Cellule As Range, Cel As String, Cpt As Integer, Plage As Range, lim As Integer, chaine As String
Dim origine As Integer, pas As Integer

For Cpt = 1 To lim
    Cel = "A" & CStr(Cpt)
    Set Cellule = Range(Cel)
    Cellule.Value = Cpt
    Cel = "B" & CStr(Cpt)
    Range(Cel).Value = Range(Cel).Value ^ 2
Next Cpt

    Set MonClasseur = Application.Workbooks.Add
    origine = Application.InputBox("Saisissez l'origine, ex: 1", "Origine", Type:=1)
    pas = Application.InputBox("Saisissez le pas", "Pas", Type:=1)
    With MonClasseur.Worksheets(1).Cells(1, 1)
        .Value = origine
        .Resize(100).DataSeries RowCol:=xlColumns, Type:=xlLinear, Step:=pas, Stop:=100, Trend:=True
        End With
    MonClasseur.SaveCopyAs "temp.xls"
    Debug.Print MonClasseur.Saved
End Sub
