Search the web
Sign In
New User? Sign Up
XL-mania · Microsoft Excel Community

Group Information

  • Members: 14317
  • Category: Microsoft Excel
  • Founded: May 8, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

  Messages Help
Advanced
MEMBUAT BORDERS OTOMATIS   Message List  
Reply Message #19912 of 20001 |

Dear Xl mania,

 

Saya memiliki program sederhana VB dengan report excel.

Dari hasil koding di bawah akan menhasilkan data seperti file terlampir (Sheet 1).

Yang saya mau tanyakan adalah Bagaimana caranya agar saat print,  range dari data tersebut memiliki border secara otomatis (Sheet 2).

Ada yg bisa tambahkan coding dibawah, agar hasilnya bisa seperti yg di inginkan ?

 

 

 

 

    If Not ramadhan.EOF Then

    .Sheets("reguler").Select

    a = 2

 

                Do While Not ramadhan.EOF

               

                .Cells(a, 1) = ramadhan.Fields("cek")

                .Cells(a, 2) = ramadhan.Fields("kode_customer")

                .Cells(a, 3) = ramadhan("customer_nama")

                .Cells(a, 4) = ramadhan("no_invoice")

                .Cells(a, 5) = ramadhan("no_faktur")

                .Cells(a, 6) = ramadhan("tgl_invoice")

                .Cells(a, 7) = ramadhan("tgl_input")

                .Cells(a, 8) = ramadhan("kode_item")

                .Cells(a, 9) = Val(ramadhan("qty"))

                .Cells(a, 10) = Val(ramadhan("harga_beli"))

                .Cells(a, 11) = Val(ramadhan("harga_jual"))

                .Cells(a, 12) = (ramadhan("qty")) * (ramadhan("harga_beli"))

                .Cells(a, 13) = (ramadhan("qty")) * (ramadhan("harga_jual"))

                .Cells(a, 14) = (.Cells(a, 13)) - (.Cells(a, 12))

                .Cells(a, 15) = ramadhan("remark")

 

    ramadhan.MoveNext

    a = a + 1

   

    Loop

    Else

 

    End If

 

 

 

Terima kasih

Ramadhan



Thu Feb 2, 2012 1:51 am

ramawibowo_lp3i
Offline Offline
Send Email Send Email

Attachment
CONTOH REPORT.xlsx
Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Message #19912 of 20001 |
Expand Messages Author Sort by Date

Dear Xl mania, Saya memiliki program sederhana VB dengan report excel. Dari hasil koding di bawah akan menhasilkan data seperti file terlampir (Sheet 1). Yang...
Rama
ramawibowo_lp3i Offline Send Email
Feb 2, 2012
3:23 pm

mungkin menjadi spt ini If Not ramadhan.EOF Then**** .Sheets("reguler").Select**** a = 2**** Do While Not ramadhan.EOF .Cells(a, 1) = ramadhan.Fields("cek") ...
i Haps
liz_indri_haps Offline Send Email
Feb 3, 2012
12:06 pm

Bagaimana kalau dicoba menggunakan ini: Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With...
nangagus
nangagus@... Send Email
Feb 3, 2012
12:06 pm

Coba gunakan: Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) ...
nangagus
nangagus@... Send Email
Feb 3, 2012
12:06 pm

Pak Rama, Terlampir Macro hasil rekaman. Salam, Hendrik Karnadi ________________________________ From: Rama <rama@...> To: XL-mania@yahoogroups.com ...
hendrik karnadi
hendrikkarnadi Offline Send Email
Feb 3, 2012
12:06 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help