Hirdetés

Keresés

Új hozzászólás Aktív témák

  • Des1gnR

    őstag

    válasz Des1gnR #26914 üzenetére

    Ezt visszaalakítva számmá, már tényleg azt kapom amit kell, dzsír :C

    Itt a kód, amivel a meg sem nyitott CSV-ben kicserélem a pontot vesszővé. ;)
    Sub CSVFormaz()

    Dim MyPath As String
    Dim MyFile As String
    Dim Wkb As Workbook
    Dim Cnt As Long

    Application.ScreenUpdating = False

    MyPath = "C:\Users\Public\Documents\" 'change the path accordingly

    If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\"

    MyFile = Dir(MyPath & "arlista_temp.csv")

    Cnt = 0
    Do While Len(MyFile) > 0
    Cnt = Cnt + 1
    Set Wkb = Workbooks.Open(MyPath & MyFile)

    Wkb.Worksheets("sheet_arlista_temp").Select
    Columns("C:C").Select
    Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False

    Wkb.Close savechanges:=True
    MyFile = Dir
    Loop

    If Cnt > 0 Then
    MsgBox "Completed...", vbExclamation
    Else
    MsgBox "No files were found!", vbExclamation
    End If

    Application.ScreenUpdating = True

    End Sub

Új hozzászólás Aktív témák

Hirdetés