Skip to main content

AccessTr.neT


Access İle Excel Hücresi Biçimlendirme

Access İle Excel Hücresi Biçimlendirme

#12
(19/12/2019, 16:00)ozanakkaya yazdı:
Dim xlApp As Excel.Application
Dim xlSh As Excel.Worksheet
Dim objWkb As Excel.Workbook
Set xlApp = New Excel.Application

xlApp.Visible = True
Set objWkb = xlApp.Workbooks.Add

With xlApp.Sheets(1)
    Set Rng = .Range("B2:H" & Me.Liste5.ListCount + 1)
End With

Rng.Borders.Weight = 2

With Rng.Borders(7)
    .LineStyle = 1
    .ColorIndex = 0
    .TintAndShade = 0
    .Weight = 3
End With
With Rng.Borders(8)
    .LineStyle = 1
    .ColorIndex = 0
    .TintAndShade = 0
    .Weight = 3
End With
With Rng.Borders(9)
    .LineStyle = 1
    .ColorIndex = 0
    .TintAndShade = 0
    .Weight = 3
End With
With Rng.Borders(10)
    .LineStyle = 1
    .ColorIndex = 0
    .TintAndShade = 0
    .Weight = 3
End With

For i = 0 To Me.Liste5.ListCount - 1

xlApp.Sheets(1).Cells(i + 2, 2).Value = Me.Liste5.Column(0, i)
xlApp.Sheets(1).Cells(i + 2, 3).Value = Me.Liste5.Column(1, i)
xlApp.Sheets(1).Cells(i + 2, 4).Value = Me.Liste5.Column(2, i)
xlApp.Sheets(1).Cells(i + 2, 5).Value = Me.Liste5.Column(3, i)
xlApp.Sheets(1).Cells(i + 2, 6).Value = Me.Liste5.Column(4, i)
xlApp.Sheets(1).Cells(i + 2, 7).Value = Me.Liste5.Column(5, i)
xlApp.Sheets(1).Cells(i + 2, 8).Value = Me.Liste5.Column(6, i)

Next i

xlApp.Sheets(1).Range("B1").Select
xlApp.Sheets(1).Range("B1").ColumnWidth = "40"
Hocam Bu Kod Oldu Olmasına da
biçimlendirmenin C5 ten başlaması için
    Set Rng = .Range("B2:H" & Me.Liste5.ListCount + 1) 
bu kodda B2 yi C5 yapıyorum C3 Ten başlıyor
C5 Ten başlatmak için hangi kodda değişiklik yapmak gerekir
Teşekkür ederim
Son Düzenleme: 19/12/2019, 20:18, Düzenleyen: zaferlacin. (Sebep: Biçimlendirme hatalı oldu)
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: excel - Yazar: berduş - 18/12/2019, 13:34
Cvp: excel - Yazar: zaferlacin - 18/12/2019, 18:34
Cvp: excel - Yazar: zaferlacin - 19/12/2019, 13:41
Cvp: Access İle Excel Hücresi Biçimlendirme - Yazar: zaferlacin - 19/12/2019, 18:52