Setting Range in VBA - partial repost
Hi Stacey,
Seems my post & JLGWhiz crossed.
I have just had a quick look at Deborah's example file.
From your recent post it appears your details (or "database") are in
the range "A1:M150" on the sheet "ReportsGenerate". If this is correct
there are a number of things you need to change:
1) Replace:
Set rng = Range("Database")
With:
Set rng = Sheets("ReportGenerate").Range("A1:M150")
2) Deborah uses columns J & L to set up temporary data but your
"database" already extends to column M. Therefore throughtout the code
replace column J with O and L with Q.
Also note that Deborah's names are in column C, if your student names
are in a different column that needs changing as well.
The above should get you up & running but please be aware that
although technically there is no limit to the number of sheets Excel
can handle there are many dependencies. I have had workbooks where the
number of sheets l could create using VBA is much less than 150 (or
however many unique student names you have.)
Hope this helps
Regards
Michael
|