I have tested changing The code to Sub TestFileOpened()
' Test to see if the file is open.
If IsFileOpen("c:\Book2.xls") Then
MsgBox "File already in use!"
Else
MsgBox "File not in use!"
Workbooks.Open "c:\Book2.xls"
End If
End Sub
This is a genera code that i found on http://support2.microsoft.com/kb/291295
And i have changed it from the exampelfile to an existing file on my computer.
i also tried changeing the If isFileOpen function to If IsWorkBookOpen.
But no luck
I have version 15 don't know if the code should be formulated in a different way from exampel i got and that why or if im simply stupid.
I got it working yesterday but after that the computer froze and i hade to restart and now it wont work.
I also have problem finding new macros in the list aldo its save within the worksheet it wont pop up, any clues?
Please help.
Bookmarks