Hi i have a problem, i have a simple macro enabled button which loads a second workbook page, unfortunately if someone is already in the workbook it loads it skips the read only warning that states who is currently using the workbook and simply asks for the password and puts them into a read only format.
Is it possible to add an error code or if code that determines that another user is in the file and then tells the person who is in it and that it is going into a read only format.
(I attempted to make the macro a hyper link instead but unfortunately the hyperlink wont copy across the macro enabled settings which i need to make items in the new workbook operate correctly so i have to use a macro to open it)
My current code is:
<TABLE cellSpacing=0 cellPadding=6 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">
</TD></TR></TBODY></TABLE>
Any help on this would be greatly appreciated as it is a necessary inclusion.
In addition i have noticed if they input the password incorrectly it doesnt bring up an error saying password is incorrect it instead tells them that the macro has had a problem is there code i can add that will provide an error message rather than the debug code?
<!-- / message --><!-- edit note -->
Is it possible to add an error code or if code that determines that another user is in the file and then tells the person who is in it and that it is going into a read only format.
(I attempted to make the macro a hyper link instead but unfortunately the hyperlink wont copy across the macro enabled settings which i need to make items in the new workbook operate correctly so i have to use a macro to open it)
My current code is:
<TABLE cellSpacing=0 cellPadding=6 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">
Code:
Sub Litigation()
'
' Litigation Macro
'
'
Workbooks.Open Filename:="H:\Staff Returns\2010\Litigation.xlsm"
End Sub
Any help on this would be greatly appreciated as it is a necessary inclusion.
In addition i have noticed if they input the password incorrectly it doesnt bring up an error saying password is incorrect it instead tells them that the macro has had a problem is there code i can add that will provide an error message rather than the debug code?
<!-- / message --><!-- edit note -->