oh iya, ini perintahnya : activesheet.printout *copies:=*lc Regards, Kid
2016-10-18 9:47 GMT+07:00 'Riki' [email protected] [belajar-excel] < [email protected]>: > > > Terimakasih Master Kid > > > > Belum bisa, master. > > Ini kode yang saya pakai : > > > > Sub Print_Tombol() > > Dim lC As Long > > ULANGI: > > lC = Application.InputBox("Print berapa lembar (1 sampai 99)? Cancel > bila tidak jadi print", Type:=1) > > If lC < 0 Or lC > 99 Then > > GoTo ULANGI > > ElseIf lC = 0 Then > > MsgBox "Batal" > > Exit Sub > > End If > > ActiveSheet.PrintOut lC > > End Sub > > > > Ada yang salah? > > > > Terimakasih > > Riki > > *From:* [email protected] [mailto:belajar-excel@ > yahoogroups.com] > *Sent:* Friday, October 14, 2016 4:28 AM > *To:* BeExcel > *Subject:* Re: [belajar-excel] Tanya Kode Macro Print dengan Jumlah > Salinan (Copies) > > > > > > Hai Riki, > > Asumsinya ada sebuah tombol untuk melakukan print. > > Tombol tersebut berisi perintah untuk menentukan area yang akan di-print. > > Pasti di dalam tombol tersebut berisi baris kode yang syntax nya begini : > > object_yang_akan_dicetak.printout > > seperti : > > sheets("invoice").range("c7:k19").printout > > atau > > activesheet.printout > > dan sebagainya. > > Sebelum baris seperti itu, diberi kode berikut : > > dim lC as long > > ULANGI: > lc=application.inputbox("Tentukan jumlah salinannya (1 sampai 1234). > Cancel untuk membatalkan proses cetak.",type:=1) > > if lc<0 or lc>1234 then > > goto ulangi > > elseif lc=0 then > > msgbox "Batal" > > exit sub > > endif > > 'baris print disini, seperti : > sheets("invoice").range("c7:k19").printout *lc* > > Jika akan mencegah proses print lewat menu, tambahkan baris : > > application.enableevents=false > > sebelum baris kode blabla.printout [blibli] > > dan tambahkan juga baris kode : > > application.enableevents=true > > setelah baris kode blabla.printout [blibli] > > kemudian buat event workbook before print, isi dengan baris kode : > > cancel=true > > > > selebihnya, silakan dikembangkan lebih lanjut. > > Regards, > > Kid > > > > > > > 2016-10-13 15:04 GMT+07:00 'Riki' [email protected] > [belajar-excel] <[email protected]>: > > > > Dear Masters, > > > > Saya mau tanya kode macro untuk perintah print, namun dengan pertanyaan > jumlah Salinan terlebih dahulu sebelum eksekusi, dan hasil eksekusi sesuai > dengan jumlah Salinan yang dimasukan. > > > > Suwun Masters. > > Riki Excel Newbie. > > > > >

