maaf ada variables yg tidak jadi dipakai; belum dihapus
harusnya:
Sub SheetNameAngka_
' siti Vi / 17 July 2009
Dim i As Integer, k As Integer, j As Integer, n As Integer
n = Worksheets.Count
For i = 1 To n - 1
For k = n To (i + 1) Step -1
j = k - 1
If CInt(Worksheets(
Worksheets(j)
End If
Next k
Next i
End Sub
Sub SheetName_Sort(
' siti Vi / 17 July 2009
Dim i As Integer, k As Integer, j As Integer, n As Integer
n = Worksheets.Count
For i = 1 To n - 1
For k = n To (i + 1) Step -1
j = k - 1
If Worksheets(k)
Worksheets(j)
End If
Next k
Next i
End Sub
sekali lagi dikabarkan bahwa
FUNGSI tidak dapat melaksanakan ACTION
FUNGSI hanya dapat menghadirkan data (hasil dari komputasi yg terjadi didalamnya)
Untuk mengurutkan NamaSheeet, diperlukan ACTION atau action-action/
Agar Rangkaian Action dapat dijalankan lagi dengan cepat, maka
rangkaian Action itu di CODEkan dalam sebuah tulisan.
Lain kali, jika ingin melaksanakan Rangkaian Action itu, kita tinggal menJALANkan
CODE tadi
Code seperti itulah yg di excel sering disebit makroh.
contohnya di workbook (attached)
Seperti biasanya menjalankan makro dengan menekan Alt+F8,
pilih nama makronya, lalu tekan tombol RUN.
Pada contoh ada dua makro SheetNameAngka_SORT dan SheetName_SORT '------------
Makro yg pertama SheetNameAngka_SORT untuk mengurutkan nama worksheet
yg berpenampilan ANGKA. (agar 9 dianggap lebih kecil dari 10)--------- --------- ----
Sub SheetNameAngka_Sort()
' siti Vi / 17 July 2009
Dim i As Integer, k As Integer, j As Integer, n As Integer
Dim w As Integer, vTitip As String
n = Worksheets.Count
For i = 1 To n - 1
For k = n To (i + 1) Step -1
j = k - 1
If CInt(Worksheets(k).Name) < CInt(Worksheets( j).Name) Then
Worksheets(j).Move after:=Worksheets( k)
End If
Next k
Next i
End Sub
Sub SheetName_Sort()
' siti Vi / 17 July 2009
Dim i As Integer, k As Integer, j As Integer, n As Integer
Dim w As Integer, vTitip As String
n = Worksheets.Count
For i = 1 To n - 1
For k = n To (i + 1) Step -1
j = k - 1
If Worksheets(k).Name < Worksheets(j) .Name Then
Worksheets(j).Move after:=Worksheets( k)
End If
Next k
Next i
End Sub
| 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 |
+-------------------------------------------------------------------+
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Nenhum comentário:
Postar um comentário