View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Neal Zimm Neal Zimm is offline
external usenet poster
 
Posts: 345
Default Called subs versus functions

I'm relatively new to VB and Excel.
Below is an example of a 'utility sub' that I use. (vars are dim'ed in
declarations section.)

The mso HELP does not help efficiency or other factors concerning
choosing a sub or a function for code like this, or perhaps with some 'more'
processing.

What advice do you have? Thanks.

Sub zHide_rowrange(fromrow, torow)
first = fromrow
last = torow
hiderange = first & ":" & last
Rows(hiderange).Select
Selection.EntireRow.Hidden = True
End Sub
--
Neal Z