I have a Sub which creates a workbook and populates the worksheets
I have another Sub which runs through the worksheets, I'll add some error checking to make sure the referenced workbook is still open (pesky users), but assume it is open for purpose of question.
I had this working yesterday but also had the referenced workbook created/opened when running. I think it may have to do with nonexistence of referenced workbook but I'm not sure. Any ideas?
Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.
Code:
Set NewWB = Workbooks.Add
NewWB.SaveAs "C:\" & "Test" & Format(Now, "mm_dd_yyyy") & ".xls"
I have another Sub which runs through the worksheets, I'll add some error checking to make sure the referenced workbook is still open (pesky users), but assume it is open for purpose of question.
Code:
For Each WS In Workbooks("Test" & Format(Now, "mm_dd_yyyy") & ".xls").Worksheets
[COLOR=green]'above line throws run time error when I try to run[/color]
For iAllRows = 1 To WS.UsedRange.Rows.Count
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
I think I've forgotten this before.