VBExcel

<keywords content="VBexcel, VB, excel" />

Attendre dans un script vb

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime


Date de dernière modification

Date de dernière modification


Import de fichier csv

  • avec copy paste dans la feuille sSheetNAme
SUB ImportTxtFile(sName AS STRING, sSheetName AS STRING)
    sCommandSheet = ActiveSheet.Name
    sMyBook = ActiveWorkbook.Name
    Workbooks.Open FileName:=sName
    Cells.Select
    Selection.Copy
    fileWorkBook = ActiveWorkbook.Name
    Windows(sMyBook).Activate
    Sheets(sSheetName).Select
    ActiveSheet.Cells.Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Workbooks(fileWorkBook).Close SaveChanges:=False
    Windows(sMyBook).Activate
    Sheets(sCommandSheet).Select
    ActiveWorkbook.SAVE
END SUB



   import de fichier



Liens Externes