woonyah
06-18-2008, 09:16 PM
Hi.
For the previous post on auto_open, thanks for your help. It helps me alot.
Now i got something to ask you again.
I have this code
Private Sub Workbook_open()
Application.Visible = True
If Application.Workbooks.Count > 1 Then
With CreateObject("Excel.Application")
.Visible = True
.DisplayAlerts = False
.Workbooks.Open ThisWorkbook.FullName, , True
.ActiveWorkbook.RunAutoMacros xlAutoOpen
End With
ThisWorkbook.Close False
End If
If ActiveWorkbook.Name = "Portfolio_123.xls" Then
DisableCutAndPaste
Else:
Call EnableCutAndPaste
End If
End Sub
However, when i open the file with this code and together with 3 other files that are also being opened before hand, it is a read only file. How can improve in the code to make it not a read only file?
For the previous post on auto_open, thanks for your help. It helps me alot.
Now i got something to ask you again.
I have this code
Private Sub Workbook_open()
Application.Visible = True
If Application.Workbooks.Count > 1 Then
With CreateObject("Excel.Application")
.Visible = True
.DisplayAlerts = False
.Workbooks.Open ThisWorkbook.FullName, , True
.ActiveWorkbook.RunAutoMacros xlAutoOpen
End With
ThisWorkbook.Close False
End If
If ActiveWorkbook.Name = "Portfolio_123.xls" Then
DisableCutAndPaste
Else:
Call EnableCutAndPaste
End If
End Sub
However, when i open the file with this code and together with 3 other files that are also being opened before hand, it is a read only file. How can improve in the code to make it not a read only file?