View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Cycling through workbooks

Those strings that do the concatenation look the same to me.

What happens when you try to open one of the workbooks?

Maybe your variables aren't what you think--or maybe the file that was created
didn't have the name that you think.

I would usually provide the .xls when doing the file|saveAs in code. But excel
is pretty smart and should add it to the filename.

One more thing, what version of excel are you using? You're not getting hit by
one of those .xlsx or .xlsm vs .xls extension differences are you?

Nico wrote:

Hello,

I'm creating various spreadsheets for managers listing accesses to various
programs in a number of tabs, to avoid the out of memory error, I've broken
it down into four stages.

The first stage creates the a file for each manager and copies the first
batch of records into a given manager's spreadsheet, and the rest are
supposed to copy teh rest of the records from the other files, but I can't
get it to open the original spreadsheets.

The spreadsheets were successfully created with the following code:

ActiveWorkbook.SaveAs Filename:="\\[server and folder path]\Quarterly
Attestations\Quarterly Reports\" & SPOC & " - " & QYear & " " & QName,
FileFormat:=xlNormal, _

SPOC = Manager's name (ex. Smith, Bob)
QYear = Year (ex. 2008)
QName = Quarter (ex. Q2)

I've been trying to use the following to open the workbook without luck:

Workbooks.Open Filename:="\\[server and folder path]\Quarterly
Attestations\Quarterly Reports\" & SPOC & " - " & QYear & " " & QName & ".xls"

It will cycle through some 500 manager names during the updating. Is there
another way I should be doing this?

Thanks!


--

Dave Peterson