DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Merhaba,
Son kodlar tekrar kısaldı, onu incelediniz mi?![]()
Necdet Yeşertener;256909' Alıntı:Sayın hemşehrim,
İstemelisiniz hemde çok istemelisiniz, yardımcı olabilirsem ne mutlu bana, ama yardımcı olamazsam yardım eden arkadaşlardan da bende birşeyler öğrenmiş olurum.
Amaç hep berebar bilgimizi paylaşmak, öğrenmek ve öğrendiklerimizi anlatmak.
Saygılar.
Ferhat Pazarçevirdi;256934' Alıntı:Necdet hocam, yettim gali
Gerçi; "Pişmiş aşa su katılmaz derler" ama ...
Sizin kodlardaki, Kayıt = Kayıt & Chr(9) & e.Cells(x, y) satırını formatlasak da şöyle denesek olur mu acep ?
Kayıt = Kayıt & Chr(9) & Format(e.Cells(x, y), "0,00")
Kayıt = Kayıt & Chr(9) & Format(e.Cells(x, y), "0[B][COLOR=red].[/COLOR][/B]00")
Selamlar,
Aşağıdaki şekilde denermisiniz.
Kod:Kayıt = Kayıt & Chr(9) & Format(e.Cells(x, y), "0[B][COLOR=red].[/COLOR][/B]00")
Sub txtolustur()
On Error Resume Next
'KLASÖR AÇMA-------------------------------------------------------------------------------
Sheets("MUHTASAR").Select
If Right([Q8], 1) <> "\" Then [Q8] = [Q8] & "\"
If Dir([Q8]) = "" Then MkDir ([Q8])
ActiveWorkbook.Save
'İCMAL.TXT OLUŞTURMA TANIMLARI-------------------------------------------------------------
Open Sheets("MUHTASAR").[Q8] & Sheets("MUHTASAR").[Q3] & "-ICMAL" & ".txt" For Output As #1
Set e = Sheets("ICMAL")
For x = 1 To e.[A65536].End(3).Row
If e.Cells(x, "A") <> "0" And e.Cells(x, "A") <> "" Then
Kayıt = Format(e.Cells(x, 1), "000")
For y = 2 To 3 'BURADAKİ 10 SÜTUN SAYISINI GÖSTERİR,
If Len(Round(Format(e.Cells(x, y), "0.00"), 2)) - Len(Int(Round(Format(e.Cells(x, y), "0.00"), 2))) = 0 Then
Kayıt = Kayıt & vbTab & WorksheetFunction.Rept(" ", 12 - Len(Round(Format(e.Cells(x, y), "0.00"), 2))) & Format(e.Cells(x, y), "0.00")
Else
Kayıt = Kayıt & vbTab & WorksheetFunction.Rept(" ", 15 - Len(Round(Format(e.Cells(x, y), "0.00"), 2))) & Format(e.Cells(x, y), "0.00")
End If
Next
Print #1, Kayıt
End If
Next
Close #1
'LISTE.TXT OLUŞTURMA TANIMLARI-------------------------------------------------------------
Open Sheets("MUHTASAR").[Q8] & Sheets("MUHTASAR").[Q3] & "-LISTE" & ".txt" For Output As #1
Set e = Sheets("LISTE")
For x = 1 To e.[A65536].End(3).Row
If e.Cells(x, "A") <> "0" And e.Cells(x, "A") <> "" Then
Kayıt = e.Cells(x, 1)
For y = 2 To 8 'BURADAKİ 10 SÜTUN SAYISINI GÖSTERİR
If y = 4 Or y = 5 Then
Kayıt = Kayıt & vbTab & e.Cells(x, y)
ElseIf y = 6 Then
Kayıt = Kayıt & vbTab & Format(e.Cells(x, y), "000")
ElseIf y > 6 Then
If Len(Round(Format(e.Cells(x, y), "0.00"), 2)) - Len(Int(Round(Format(e.Cells(x, y), "0.00"), 2))) = 0 Then
Kayıt = Kayıt & vbTab & WorksheetFunction.Rept(" ", 12 - Len(Round(Format(e.Cells(x, y), "0.00"), 2))) & Format(e.Cells(x, y), "0.00")
Else
Kayıt = Kayıt & vbTab & WorksheetFunction.Rept(" ", 15 - Len(Round(Format(e.Cells(x, y), "0.00"), 2))) & Format(e.Cells(x, y), "0.00")
End If
Else
Kayıt = Kayıt & vbTab & e.Cells(x, y)
End If
Next
Print #1, Kayıt
End If
Next
Close #1
'MESAJ OLUŞTURMA TANIMLARI-------------------------------------------------------------
MsgBox [Q3] & " Firmasının " & [Q7] & " Dönemine Ait Txt Dosyaları " & [Q8] & " Klasörüne Başarı İle Kaydedilmiştir", vbInformation
End Sub