No New Workbook Annoyance

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello,
I have this problem where after running my macro, Excel no longer
loads a new workbook automatically; the user has to either press Ctrl
+N or go to File->New... It's a minor annoyance, but I was hoping to
have my macro not need the user to do this everytime they open up
Excel. The macro code is shown below:

Sub AutoExec()
Dim file_Check As Object

Set file_Check = CreateObject("Scripting.FileSystemObject")
If file_Check.FileExists(Selection.Application.Path & "\XLSTART
\Excel2Wiki.xls") = False Then
ActiveWorkbook.SaveAs Filename:=Selection.Application.Path &
"\XLSTART\Excel2Wiki.xls", FileFormat:=xlNormal
Call DeleteMenus
Call CreateMenus
ActiveWindow.Visible = False
Application.Quit
End If
End Sub

Before running this, Excel automatically loads a new workbook. After
deleting the *.xls from the XLSTART folder, Excel is restored to
loading a new workbook. However, when the *.xls is in the XLSTART, it
is hidden, but Excel doesn't automatically load a new workbook. If
anybody can explain the cause and/or the solution, that would be
great. Thanks.
.



Relevant Pages

  • RE: Activating a renamed workbook
    ... The go to tab Commands and select Macro. ... my programming experience in Outlook is very poor so please help me out. ... Then I can have a procedure in the main Excel application installing the ... because it activates the workbook always having the same name! ...
    (microsoft.public.excel.programming)
  • [NT] Cumulative Patches for Excel and Word for Windows
    ... The attacker's macro code could take any actions on the system ... * An Excel macro execution vulnerability that relates to how inline ... * An Excel macro execution vulnerability that relates to how macros are ... It is possible for macros in a workbook so invoked to run ...
    (Securiteam)
  • Microsoft Security Bulletin MS02-031
    ... Cumulative Patches for Excel and Word for Windows ... all of which could enable an attacker to run Macro code on a user's machine. ... - An Excel macro execution vulnerability that relates to how inline ... workbook so invoked to run automatically. ...
    (microsoft.public.security)
  • RE: Activating a renamed workbook
    ... Dim myInspector As Outlook.Inspector ... The go to tab Commands and select Macro. ... Then I can have a procedure in the main Excel application installing the ... because it activates the workbook always having the same name! ...
    (microsoft.public.excel.programming)
  • RE: Strange Excel Application Object Behavior
    ... I'm running a macro in Word, which opens two workbooks, copies ... But Excel doesn't behave well sometimes after this, ... When I click on the workbook icons I ... Dim obXlTestAPP As Excel.Application ...
    (microsoft.public.excel.programming)