S
Stephen
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.
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.