Hi All
I have been trying various codes to open a selection of one Page workbooks (Graphs) from Both Access and other Workbooks. Access is being used mainly as login and navigation to reports.
The below code is the best I have so far, but when opening form Access 2003 , I still get password prompt?
I have also attached the Open/Close code I am using in the workbook itself.
Thanks as always
I have been trying various codes to open a selection of one Page workbooks (Graphs) from Both Access and other Workbooks. Access is being used mainly as login and navigation to reports.
The below code is the best I have so far, but when opening form Access 2003 , I still get password prompt?
I have also attached the Open/Close code I am using in the workbook itself.
Thanks as always
Code:
Sub OpenXL2()
On Error GoTo E
Dim xlApp As Object
Dim Location As String
Location = "P:\NMUK Data\Snags Data\Line 1 and Line 2 New PLM\TPM DATABASE\1. Reports\TEST.xlsm"
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "P:\NMUK Data\Snags Data\Line 1 and Line 2 New PLM\TPM DATABASE\1. Reports\TEST.xlsm", True, False, Password:="1978"
Set xlApp = Nothing
Exit Sub
E: MsgBox ("This File has moved. Last loaction was " & Location)
End Sub
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.DisplayFullScreen = False
Me.Save
End Sub
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.WindowState = xlMaximized
SetAllScrollAreas
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = False
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
End Sub