Minggu, 11 Maret 2012

Re: [ExcelVBA] This Can't Be Happening

 

Hi Dave S and David Grugeon,

My homework: Write 500 (or maybe 5000 times)
I MUST BE SURE WHICH IS THE ACTIVE SHEET
I MUST BE SURE WHICH IS THE ACTIVE SHEET 

I MUST BE SURE WHICH IS THE ACTIVE SHEET 

I MUST BE SURE WHICH IS THE ACTIVE SHEET 

I MUST BE SURE WHICH IS THE ACTIVE SHEET 

After I finish that homework, I should write 500 times
THERE IS ALWAYS A N0N-MYSTICAL ANSWER, AND IT'S USUALLY THE WRONG ACTIVE SHEET.

I added Sheets("Parents2").Activate before the autofill and it works perfectly. When I was debugging I clicked on Parents2, to see what was happening, and changed the active sheet. And I did it over and over again, and never had a clue.

I implemented David Grugeon's suggestion that I combine 2 statements into 1 with
Range("F2").AutoFill Destination:= etc.

Now I'm thinking I could carry that a step further and add the sheet to the statement
Sheets("Parents2").Range("F2").AutoFill Destination:= etc
so I could be certain on which sheet the statement will execute.

So thank you both, again, for saving my sanity.
Michael Trombetta

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar