LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default ActiveWorkbook.Close (False)

Hi,
Excel - shut down.
When i remove the line
ActiveWorkbook.Close True (or False)
from my code, i do not get the error. I can close the file manually and i can
close Excel manually.
With the line of code, the macro runs, saves the workbook, gives the
completion message box, and generates the Excel error. Shutting Excel down.
It states it creates an error log. I have no clue where to look for that log.

Strange thing is that i tested this under Win and Excel XP at home and it
worked like a charm.

Thank you for your help.

Stefan
----------------------
Sub Save_1_From_User_1()
'On Error Resume Next
Dim strdate As String
strdate = Format(Now, "dd-mmm-yy -- hh-mm-ss -- ")
Application.ScreenUpdating = False
' Mark to activate macro for user 2
Range("A1").Select
ActiveCell.FormulaR1C1 = "x"
' Copy/paste User Name formula to text only
Range("UserNameRange").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
' Save the service form to location 1
' ActiveWorkbook.SaveAs "serviceformcopy.xls" ' Test Location/name 1
ActiveWorkbook.SaveAs "L:\Consultant service\Returns\Service_Forms\" &
"ID " & Sheets("Service Form").Range("C9") _
& " -- " & strdate & " from " & UserName & ".xls"
Application.ScreenUpdating = True
' Completion message and close of workbook
MsgBox "Submitted Successfully. - Thank you.", vbInformation, "Submission
Notice"
ActiveWorkbook.Close (False) '<= problem child
End Sub


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200507/1
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Excel workbook close: save= false during an auto subroutine tomwashere2 Excel Programming 10 June 16th 05 06:23 AM
error on ActiveWorkbook.Close lesviago Excel Programming 1 February 2nd 05 11:11 PM
ActiveWorkbook.Close dallas Excel Programming 0 November 3rd 04 06:27 PM
ActiveWorkbook.Close dallas Excel Programming 2 November 3rd 04 05:56 PM
ActiveWorkbook.Close Matthew[_9_] Excel Programming 4 November 13th 03 02:48 AM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"