Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-28 Thread Domain Admin
e problem.  If it >> is, you can consider declaring those variables locally in that procedure >> instead of globally, using the Static keyword so that they retain values >> between calls, and reinitializing them if they are not initialized yet. >> Global variables are usually us

Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-28 Thread Domain Admin
bles that will be used later multiple > times, you should initialize them to the greatest extent possible. > > If your purpose here is to get references to specific cells to access their > values or properties, you should ordinarily use a Range object and create a > reference to the range instead

RE: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-28 Thread Asa Rossoff
c code design, but without knowing the overall intent of your code, I can't give good advice. Asa -Original Message- From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Domain Admin Sent: Tuesday, March 27, 2012 4:54 PM To: excel-macros@googlegroups

Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-27 Thread Domain Admin
..@gmail.com > -Original Message- From: Domain Admin > Sent: Tuesday, March 27, 2012 6:54 PM > To: excel-macros@googlegroups.com > Subject: Re: $$Excel-Macros$$ Difficulty referencing non active sheet but > this must be possible > > > Thanks.  Believe me I am a firm believ

Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-27 Thread dguillett1
Microsoft MVP Excel SalesAid Software dguille...@gmail.com -Original Message- From: Domain Admin Sent: Tuesday, March 27, 2012 6:54 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible Thanks. Believe me I am a

Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-27 Thread Domain Admin
Thanks. Believe me I am a firm believer in KISS. I did not realize the . made that distinction though. Also like getting rid of worksheetfunction. I went the other way and tried to get rid of application and that failed. I thought it was the redundant one not worksheetfunction. So for cross r

Re: $$Excel-Macros$$ Difficulty referencing non active sheet but this must be possible

2012-03-27 Thread dguillett1
Sub InitRefs() dim fv As long dim lv As long With Sheets(“ChartData”) fv= .Application.Match("Stopval", .Rows(1), 0) ‘notice the dot (.) before rows End With With Sheets(“Results”) lv = .Application..Match("ReverseDate", .Rows(1), 0) ‘dot NOT needed on ACTIVE sheet but needed here. End Wit