View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
fhjfhgjf fhjfhgjf is offline
external usenet poster
 
Posts: 4
Default Error using SaveAs (object disconnected from clients!) then XL Cra

I don't know about your problem, but i'll give you the code that works for me:

'open a new book - you'd open your template
Set newbook = Workbooks.Add

'perform whatever changes are needed


'then I generate a file name in an array using test number and date info
fnamearray = Array(testno, Format(Now, "yy-mm-dd hh.mm.ss"),
"xls")
fname = Join(fnamearray, ".")

'then save it
newbook.SaveAs Filename:=fname

This works. How it relates to your problem I don't know . Good luck!