Advertisement
Advertisement
| 05.14.2008 at 09:23AM PDT, ID: 23402093 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: |
Private Sub Workbook_Open()
Application.WindowState = xlMaximized
Dim wb As Workbook
Set wb = ThisWorkbook
Dim openPath As String
Dim fileToOpen As String
openPath = ThisWorkbook.Path
fileToOpen = openPath & "\Materials.xls"
If IsFileOpen(fileToOpen) Then
'do nothing
Else
Workbooks.Open Filename:=fileToOpen
End If
wb.Worksheets("Start").Activate
End Sub
Function IsFileOpen(strFullPathFileName As String) As Boolean
Dim hdlFile As Long
'// Error is generated if you try
'// opening a File for ReadWrite lock >> MUST BE OPEN!
On Error GoTo FileIsOpen:
hdlFile = FreeFile
Open strFullPathFileName For Random Access Read Write Lock Read Write As hdlFile
IsFileOpen = False
Close hdlFile
Exit Function
FileIsOpen:
'// Someone has it open!
IsFileOpen = True
Close hdlFile
End Function
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.14.2008 at 11:25PM PDT, ID: 21571020 |
| 05.15.2008 at 08:00AM PDT, ID: 21574371 |
| 05.15.2008 at 02:20PM PDT, ID: 21578078 |
| 05.15.2008 at 03:06PM PDT, ID: 21578361 |
| 05.15.2008 at 03:13PM PDT, ID: 21578397 |
| 05.15.2008 at 04:07PM PDT, ID: 21578653 |
| 05.15.2008 at 04:42PM PDT, ID: 21578835 |
| 05.22.2008 at 10:50PM PDT, ID: 21629620 |
| 05.27.2008 at 07:58AM PDT, ID: 21652381 |
| 05.28.2008 at 12:00AM PDT, ID: 21658265 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: |
Private Sub Workbook_Open()
Application.WindowState = xlMaximized
Dim wb As Workbook
Set wb = ThisWorkbook
Dim openPath As String
Dim fileToOpen As String
openPath = ThisWorkbook.Path
fileToOpen = openPath & "\Materials.xls"
On Error Resume Next
Workbooks.Open Filename:=fileToOpen, UpdateLinks:=False, ReadOnly:=True
If Err.Number = 0 Then
MsgBox "Workbook re-opened."
Else
MsgBox "Workbook was not re-opened."
End If
wb.Worksheets("Start").Activate
End Sub
Function IsFileOpen(strFullPathFileName As String) As Boolean
Dim hdlFile As Long
'// Error is generated if you try
'// opening a File for ReadWrite lock >> MUST BE OPEN!
On Error GoTo FileIsOpen:
hdlFile = FreeFile
Open strFullPathFileName For Random Access Read Write Lock Read Write As hdlFile
IsFileOpen = False
Close hdlFile
Exit Function
FileIsOpen:
'// Someone has it open!
IsFileOpen = True
Close hdlFile
End Function
|
| 06.16.2008 at 08:55AM PDT, ID: 21794823 |