Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Document will not save in Excel2000

Status
Not open for further replies.

voodoo52

Technical User
Mar 12, 2002
2
US
I am adding some code to a module in VBA for excel2000. After I add the code and try to save the document, I first get an error that says it was unable to save and it saved it as a temporary file. And, that I should close the current workbook and open the temporary file and rename and save that. I tried that and excel is unable to open the temporary file. Then, if I try to save again, I just get an error saying Document not saved. Please help me on this if anyone has an answer.
 
Okay, I am just providing an update to my problem. I went back and added each procedure from my code to find out which one was giving me a problem and here is what I found.

SQL = "Select Sum(OverallHistoryEST.PaidHours) As PdHours, " & _
"Sum(OverallHistoryEST.SystemHours) As SysTime, " & _
"Sum(OverallHistoryEST.NowDue + OverallHistoryEST.FullBalance) As MinDue, " & _
"Sum(OverallHistoryEST.FullBalance + OverallHistoryEST.NowDue + OverallHistoryEST.PastDue + OverallHistoryEST.MonthDue) As PrevAg, " & _
"Sum(OverallHistoryEST.SpeedPay) As SpdPay, " & _
"Sum(OverallHistoryEST.Connects) As AgConn, " & _
"Sum(OverallHistoryEST.PTPKeptAcc) As KeptProm, " & _
"Sum(OverallHistoryEST.PTPBrokeAcc) As BrokProm, " & _
"Avg(OverallHistoryEST.[Update Time]) As AgUp " & _
"From OverallHistoryEST " & _
"Where OverallHistoryEST.EmployeeID = '" & UCase(frmData.txtEmpID.Text) & "' " & _
"And OverallHistoryEST.Week >= '" & dblWeekB & "' " & _
&quot;And OverallHistoryEST.Week <= '&quot; & dblWeekE & &quot;'&quot;


This SQL statement is what is causing my saving problem. It is actually each of the Sum statements after the Select statement. I can't figure out what is wrong.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top