Sub Auto_Open()
Feb 20, 2009
I am using the code below to open a workbook, run a specific macro, and then close.
everything works except the original book wont close.
Sub Auto_Open()
Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"R:DocsReportsDashboardsTest.xls"
Run ("'Test.xls'!Module1.Test")
ActiveWindow.Close
Application.Quit
End Sub
View 9 Replies
Apr 16, 2009
We have a custom sort routine activated by a double click
Sub Auto_Open()
On Error Resume Next
Application.OnDoubleClick = "AutoSort"
End Sub
It used to sit in a module in each workbook, but I modified it to work from personal.xls. When I moved it to a .xla addin file it stopped, so I'm figuring that opening a .xls doesn't trigger the auto_open event.
View 9 Replies
View Related
Aug 19, 2009
i recorded an auto_open macro in excel that is supposed to import data from an acess table into a specific worksheet. However when i start that excell document the data is imported into whatever worksheet is open instead of the worksheet that it is supposed to...
Or more importantly, what did i do wrong?
(to record the macro i started on the worksheet i want the data imported to, started to record the macro and went to data:import external data: import data. I select the acess database/table in mention. When it asks where i want to put the data i've tried clicking on A1 on the worksheet i want it to import on, and i've tryed typing "worksheetname"!A1.
It works the first time i try to import data...but if i close it out, and reopen it, it just imports to any old worksheet.
View 9 Replies
View Related
May 3, 2007
I have an auto_open module that runs a couple of other small sub routines, the query I have is it possible to hide the active window from a sub?
Because it does not seem to work for me, I can step through (F8) but when I open the workbook it just flikers but does not hide it's self.
I want to hide the work book as there is nothing that the users need to see, it just has VBA code to prcess data. There is a menu item created on the command bar so the user can run the code.
I have a pasword on the VBA code would this cause issues?
Sub Auto_Open()
my_auto_open
Add_Workbook_Menu_And_Items
End Sub
Sub my_auto_open()
Dim w As Window
For Each w In Workbooks("Star_Plus_Hindi_MKII.xls").Windows
w.Visible = False
Next
End Sub
View 9 Replies
View Related
Feb 21, 2008
I have a macro that auto opens does a couple of open and saves but then the Application.Close doesn't want to close the blank Excel screen. Can't you use Application Close in a Auto_Open macro?
Sub Auto_Open()
'
' Auto_Open Macro
' Macro recorded 1/27/2006 by Rich
'
' Keyboard Shortcut: Ctrl+c
'
Application.DisplayAlerts = False
View 9 Replies
View Related
Jan 19, 2009
When I open my workbook I get a popup that says: Welcome Back...
Using a module with the following
Sub auto_open()
MsgBox "Welcome Back..."
End Sub
I want to have it say: Welcome Back, Phixtit
Where "Phixtit" comes from the cell "C15" on my "INFO" sheet.
Example:
='INFO'!$C$15
View 9 Replies
View Related