Dear Hemant,
Lalit solution is nice
You can also check..
http://www.ozgrid.com/forum/showthread.php?t=58969
On Fri, Jul 13, 2012 at 4:51 PM, Excel Vba wrote:
> Hi Group,
>
>
> How can i declare a global variable for below mentioned.
>
>
>
> Private sub abc()
> dim sh as worksheet
> dim rng as r
Dear
If you want a variabler such that it will works for all the procedure
in a module use below.
dim sh as worksheet
dim rng as range
Private sub abc()
set sh = Thisworkbook.Sheets("Sheet1")
set rng = sh.range("a1:c"&sh.range("c"&rows.count).end(xlup).row)
End sub
or else If you want it ac