- Katılım
- 11 Şubat 2016
- Mesajlar
- 199
- Excel Vers. ve Dili
- 2013
eklediğim kodda bulunan dosya yolunu seçmeli yapmak istiyorum değişken olduğu için sıkıntı oluyor
Sub Uretimföyü()
' Makro1 Makro
Sheets("üretimföyü").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\pis\Desktop\üretimföyü.csv", Destination:=Range("$A$1"))
.Name = "üretimföyü"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 65001
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=-45
Columns("K:U").Select
Selection.Delete Shift:=xlToLeft
Range("K2").Select
ActiveWindow.SmallScroll ToRight:=-10
Selection.ClearContents
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]="""","""",TRIM(MID(RC[-6],FIND("" "",RC[-6]),LEN(RC[-6]))))"
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K10000")
Range("K2:K10000").Select
Range("A1").Select
End Sub
Sub Uretimföyü()
' Makro1 Makro
Sheets("üretimföyü").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\pis\Desktop\üretimföyü.csv", Destination:=Range("$A$1"))
.Name = "üretimföyü"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 65001
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=-45
Columns("K:U").Select
Selection.Delete Shift:=xlToLeft
Range("K2").Select
ActiveWindow.SmallScroll ToRight:=-10
Selection.ClearContents
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]="""","""",TRIM(MID(RC[-6],FIND("" "",RC[-6]),LEN(RC[-6]))))"
Range("K2").Select
Selection.AutoFill Destination:=Range("K2:K10000")
Range("K2:K10000").Select
Range("A1").Select
End Sub
