Tecnologia, programação e muito Visual FoxPro.

sábado, 1 de agosto de 2009

Re: ]] XL-mania [[ copy data dari file lainnnya

 

Silahkan mas

Sub CopytoNewFile()
Dim i As Long
Dim n As Long
Dim rLast As Long
Dim sht As Worksheet
Dim shtTergabung As Worksheet
Const sNewName As String = "File Baru"
Const rMulai As Long = 2

Set shtTergabung = Sheets("Jadi File Terpisah")
Application.DisplayAlerts = False
Application.ScreenUpdating = False

i = 2
For Each sht In Sheets
With sht
If sht.Name <> shtTergabung.Name Then
rLast = .Cells(.Rows.Count, 2).End(xlUp).Row
For n = rLast To rMulai Step -1
.Rows(n).EntireRow.Copy Destination:=shtTergabung.Rows(i)
i = i + 1

Next n
.Delete

End If
End With
Next sht

ActiveWorkbook.SaveAs ThisWorkbook.Path & "\" & sNewName
Set shtTergabung = Nothing
Application.DisplayAlerts = False
Application.ScreenUpdating = False

End Sub

2009/7/29, agt <antoni.ginting@kpi.co.id>:
> Dear Pakar
>
>
>
> Mohon bantuannya utk problem seperti attach:
>
> Saya mau copy data dari sheet 1, 2 dan 3 ke file baru seperti di sheet 4.
> Kalau dgn cara = klik kolom sih bisa, tapi karna datanya banyak dan selalu
> update, adakah cara yg simple dan manjur?
>
>
>
> Saya sudah utak-atik di data base belum ketemu nih.
>
>
>
> Best Regards,
>
> Antoni Ginting
>
> Jr. Inspection Spt.
>
> 2.JPGcid:image006.png@01C90F6D.978382C0
> Plant/Head Office:
>
> Mailing Address :
>
> Wisma KPI
>
> Jl. Pupuk Raya Km.2
>
> Bontang -75314
>
> Kalimantan Timur
>
> Phone : +62-548-41091 ext.6211
> Fax : +62-548-41417
> HP : +628125521121
> email: <mailto:antoni.ginting@kpi.co.id> antoni.ginting@kpi.co.id
>
>
>
>
>
> __________________________________________________________
>
> Disclaimer :
> __________________________________________________________
>
> This message is intended for the lawful recipient(s) explicitly stated in
> above only.
> It may contain confidential information prohibited for any Unauthorized use
> by any party
> other than the lawful addressee. The message, information and statement
> expressed herein
> should also be legally privileged for the lawful recipient(s).
>
> If you are not the intended recipient(s) or person responsible for
> delivering it to the intended recipient(s),
> you must therefore be notified not to copy, print, distribute or take any
> action in
> reliance on it, directly or indirectly.
> __________________________________________________________
> Please consider ENVIRONTMENT before PRINTING this email .
>

__._,_.___
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| XL-mania, berjuang untuk rakyat, pancen oyeeee, LANJUTKAN!        |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
Recent Activity
Visit Your Group
Give Back

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Nenhum comentário:

Arquivo do blog