Skip to main content

AccessTr.neT


formdaki bilgileri worde aktarmak

formdaki bilgileri worde aktarmak

Çözüldü #33
tam teşekküllü bi örnek kod
çok uzun bir koddan 5-6 parça aldığım için hata verebilir ama mantığı budur.

Private Sub ExcelleBasit_Click()
    On Error Resume Next
    Dim rs As Recordset
    Dim belge As Excel.Application
    Set belge = New Excel.Application

    belge.Workbooks.Add
    Me.Excelle.Caption = "Excel Açılacak Bekleyin"
    Me.Durum.Caption = "Ana Başlık Yazılıyor"
    Me.Repaint
    
    belge.Range("A1:N1").MergeCells = True
    belge.Cells(1, 1) = "CARGO MANIFEST"
    belge.Cells(1, 1).Font.name = "Arial Narrow"
    belge.Cells(1, 1).Font.Size = 12
    belge.Cells(1, 1).Font.Bold = True
    belge.Cells(1, 1).Font.Color = vbBlack
    belge.Cells(1, 1).VerticalAlignment = xlCenter
    belge.Cells(1, 1).HorizontalAlignment = xlLeft
        
    belge.Cells(2, 1) = "VESSEL:"
    belge.Cells(2, 1).Font.name = "Arial Narrow"
    belge.Cells(2, 1).Font.Size = 10
    belge.Cells(2, 1).Font.Bold = False
    belge.Cells(2, 1).Font.Color = vbBlack
    belge.Cells(2, 1).VerticalAlignment = xlCenter
    belge.Cells(2, 1).HorizontalAlignment = xlRight
    'belge.Cells(1, 1).Interior.ColorIndex = 5

    belge.Cells.EntireColumn.AutoFit
    belge.Rows("5").RowHeight = 30
    belge.Columns("A").ColumnWidth = 6
    belge.Columns("K").ColumnWidth = 5
    belge.Columns("L").ColumnWidth = 5
    belge.Columns("M").ColumnWidth = 5
    belge.Columns("N").ColumnWidth = 5

    belge.Cells(Sat, 5) = "=SUM(E6:E" & Sat - 1 & ")"
    belge.Cells(Sat, 5).Font.name = "Arial Narrow"
    belge.Cells(Sat, 5).Font.Size = 8
    belge.Cells(Sat, 5).Font.Bold = False
    belge.Cells(Sat, 5).Font.Color = vbBlack
    belge.Cells(Sat, 5).WrapText = True
    belge.Cells(Sat, 5).VerticalAlignment = xlTop
    belge.Cells(Sat, 5).HorizontalAlignment = xlRight

    belge.Cells.EntireColumn.AutoFit
    
    belge.Visible = True
        
    SendKeys "%F", True
    SendKeys "U", True
    SendKeys "%L", True
    
    SendKeys "+{TAB}", True
    SendKeys "{RIGHT}", True
    
    SendKeys "%T", True
    SendKeys ",5", True
    
    SendKeys "%L", True
    SendKeys ",5", True
    
    SendKeys "%R", True
    SendKeys ",5", True
    
    SendKeys "%B", True
    SendKeys ",5", True
    
    SendKeys "%A", True
    SendKeys ",5", True
    
    SendKeys "%F", True
    SendKeys ",5", True
    
    SendKeys "{ENTER}", True

End Sub
Murat YANDEMİR ( PyramiD YAZILIM Uluslar Arası Nakliye Programları )
Bilgisayar Programcısı (1989'dan beri)

+rep Yollar biter Access bitmez. +rep
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
formdaki bilgileri worde aktarmak - Yazar: alperadn01 - 02/01/2013, 17:23
Cvp: formdaki bilgileri worde aktarmak - Yazar: Yandemir - 11/01/2013, 01:01
Task