View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Excel macro - VBA code query

Try revising your Copy_Title routine to accept an optional arg for a
range...


Sub Copy_Title(Optional Rng As Range)

If Rng Is Nothing Then Set Rng = ActiveCell

...then adjust all its target cell ref code to use Rng. This change
tells it which cell to act on -OR- you can call it from another sub
(because it now has an arg) if you want to use it as you've been doing.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion