Thread: Dynamic Array
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Dynamic Array

It creates a new sheet for every cell in that range. Maybe you have formulas
that evaluate to ="". So that they're getting sheets created, too???

For Each vManager In vManagers.Cells
if trim(vmanager.value) = "" then
'do nothing
else
With Workbooks("check deposit report.xls")
.Worksheets("Check-Deposit").Copy _
befo=.Sheets(1)
End With
Set TempWks = ActiveSheet

With TempWks
.Unprotect
.Range("F43").Value = vManager.Offset(0, -3).Value 'date
.Range("b43").Value = vManager.Offset(0, -1).Value 'borrower
If LCase(vManager.Offset(0, 1).Value) = "broker" Then
.Range("f32").Value = "Broker"
Else
.Range("F32").Value = "Retail"
End If
.Range("a43").Value = vManager.Offset(0, 3).Value 'Loan Number
.Range("i27").Value = vManager.Offset(0, 7).Value 'Amount

'protect??
.Protect
End With
end if
Next vManager

John Pierce wrote:

I'm back. That was weird. Therre was this intense light and then . , ,
nothing, till three weeks later.
So where was I?
Dave, I tried your code. It ran and ran and ran, hundreds of pages
when there should have been only about 70 or so. Also, it picked up
all the managers instead of just S. O'Neil.
I would really like to use a dynamic array to do this because I would
like to learn to work with them. Could this program be converted to
that?


--

Dave Peterson