Re: $$Excel-Macros$$ how to declare define global range in vba

2010-02-03 Thread Swapnil Palande
Hi Ayush, Do the following steps 1. crate a function for your range ex: Public Function nRange() As Range 'Dim rng As Range 'Set rng = Sheets(M-RAW).Range(A1:A15) Set nRange = Sheets(M-RAW).Range(A1:A15) End Function 2) Now call this function where you want to use the defined range ex: Sub

Re: $$Excel-Macros$$ how to declare define global range in vba

2010-02-02 Thread Paul Schreiner
What module are you putting the declaration in? For instance, if you right-click on a sheet tab and select View Code it opens up the VBA Sheet Module. You'll notice a module called ThisWorkBook If you create standard Modules, there will be a folder called Modules and a list of modules (default

RE: $$Excel-Macros$$ how to declare define global range in vba

2010-02-02 Thread Dave Bonallack
Hi Ayush, What do you mean by outside the procedure'? Dave. Date: Tue, 2 Feb 2010 08:24:36 -0800 Subject: $$Excel-Macros$$ how to declare define global range in vba From: jainayus...@gmail.com To: excel-macros@googlegroups.com Hello Group, How can we declare and define Global range

Re: $$Excel-Macros$$ how to declare define global range in vba

2010-02-02 Thread ayush jain
Hi Paul, I have been using the Standard module. The idea is to create an add-in. The problem is that I have to use a particular range in different modules and different procedures but i don't want to define them in each procedure. Any idea ? Thank you. On Tue, Feb 2, 2010 at 10:59 PM, Paul