Problème macro Excel
byakuya
-
byakuya -
byakuya -
Bonsoir,
J'ai un soucis avec une Macro Excel et j'arrive pas à debogguer le programme, pouvez-vous m'aidez svp? Le but de la macro est d'importer le contenu d'un fichier texte sur une page de calcul. Le code est le suivant (le bog est ligne 3 et 4):
Sub ImportFichier()
' On importe le fichier
With ActiveSheet(1).QueryTables.Add(Connection:="TEXT;" & "C:\Documents and Settings\Mouss\Bureau\Macro_excel\lois_initiales\" & "beta1.txt", Destination:=Range("A1"))
' Les paramètres de l'import des données
.Name = "beta1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
End With
End Sub
Merci bien,
cordialement
J'ai un soucis avec une Macro Excel et j'arrive pas à debogguer le programme, pouvez-vous m'aidez svp? Le but de la macro est d'importer le contenu d'un fichier texte sur une page de calcul. Le code est le suivant (le bog est ligne 3 et 4):
Sub ImportFichier()
' On importe le fichier
With ActiveSheet(1).QueryTables.Add(Connection:="TEXT;" & "C:\Documents and Settings\Mouss\Bureau\Macro_excel\lois_initiales\" & "beta1.txt", Destination:=Range("A1"))
' Les paramètres de l'import des données
.Name = "beta1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
End With
End Sub
Merci bien,
cordialement
A voir également:
- Problème macro Excel
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Liste déroulante excel - Guide
- Word et excel gratuit - Guide
- Si ou excel - Guide
- Déplacer colonne excel - Guide