Tecnologia, programação e muito Visual FoxPro.

sexta-feira, 26 de junho de 2009

]] XL-mania [[ setelah print preview, hide macro jadi lambat, mohon pencerahan



Dear para Guru....
Mohon pencerahannya. Saya membuat macro berdasarkan event 

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E13,E5")) Is Nothing And Target.Cells.Count = 1 Then
ActiveSheet.Unprotect Password:="password"
HideRows
ActiveSheet.Protect Password:="password"
End If
End Sub

sedangkan hide rowsnya saya pakai 
Sub HideRows()
On Error Resume Next
With Range("A33:B131")
.EntireRow.Hidden = False
For i = 1 To .Rows.Count
If WorksheetFunction.Sum(.Rows(i)) = 0 Then
.Rows(i).EntireRow.Hidden = True
End If
Next i
End With
End Sub

Masalah saya adalah, setiap kali saya lakukan print preview, kemudian saya ubah di sel E13, E5, proses hide rows menjadi sangat lambat dibanding sebelum melakukan preview.  Running akan normal lagi setelah file ditutup dan dibuka lagi.
Mohon bantuan dan sarannya.

Terimakasih

Wahid

__._,_.___
+-:: 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
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Everyday Wellness

on Yahoo! Groups

Find groups that will

help you stay fit.

Y! Groups blog

The place to go

to stay informed

on Groups news!

.

__,_._,___

Nenhum comentário:

Arquivo do blog