Microsoft Office Tutorials and References
In Depth Information
SELF-SIGN YOUR MACROS FOR CO-WORKERS
In the next line of code, the rng variable points to A2:A999. Using SpecialC
ells(xlCellTypeVisible) is equivalent to clicking the Special button on
the GoTo dialog and choosing Visible Cells Only. This selects A9, A116, A134,
and so on. In the same line of code, the EntireRow.Delete method removes all
the rows that match the criterion.
The last bit of cleanup is to get rid of the AutoFilter dropdowns . You can
issue the AutoFilter command without any arguments, as shown in the last
line of code, to turn them off.
Summary: Using AutoFilter is a fast way to delete records that match a
The code was proposed by Richard Schollar and nominated by Jon von der
SELF-SIGN YOUR MACROS
Challenge: You’ve created some macros for co-workers to use. Having them
click Enable Macros each time is tiresome, but you don’t want them to drop their
macro security settings too low.
Solution: You can provide a self-signed certiﬁ cate for your macros. Getting an
“ofﬁ cial” certiﬁ cate can be pricey, but you can create one yourself.
To create the certiﬁ cate, select Start, All Programs, Microsoft Ofﬁ ce, Microsoft
Ofﬁ ce Tools, Digital Certiﬁ cate for VBA Projects. Type a name for your certiﬁ cate,
as shown in Figure 149.
Figure 149. You can create your own certii cate.