Hi,
I have two files, Book1 and Book2 with both files contains TextBox2 and TextBox1 respectively.
Book1, contain TextBox2 - to identify if Book2 is Open already or not yet.
Book2, contain TextBox1 - to identify if Book1 is Open already or not yet.
Both file contain CommandButton to Open File each other (code contribute to Kev).
Below the code inside Book1, to Open File Book2
[code]
Private Sub CommandButton1_Click()
''''''''Condition To Open File Book1 from Book2
If UserForm1.TextBox1.Value = 0 Then 'File Book1.still Close
UserForm1.Hide
Set wb = Workbooks.Open(FilePath1)
Application.Run "Book1.xlsm!Show_UserForm1_Page1"
ElseIf UserForm1.TextBox1.Value = 1 Then 'File Book1.Open already
UserForm1.Hide
Application.Run "Book1.xlsm!Show_UserForm1_Page1"
End If
End Sub
[\code]
Problem,,,If Book1, as the first file Opened, then only Book1 been identified as File already Opened And Book2 will not identified as File Opened even though the File Opened already.
Why only the first file Opened will be identified as File Opened already?
I need any Excel files which Opened will be identified.
Thanks in advance for any contribution.
Kind Regards,
Iqballhud
Bookmarks