Re: $$Excel-Macros$$ Query- Global Variable

2012-07-16 Thread NOORAIN ANSARI
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

Re: $$Excel-Macros$$ Query- Global Variable

2012-07-13 Thread ╰» ℓαℓιт мσαнη
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