• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

if excel file already open then dont open again

vipulhumein

New Member
i have linked two excel file. if u open one file then automatically second file open and i want that if the second file already open then dont open again.


please send me the answer as soon as possible
 
Have a look at:

http://stackoverflow.com/questions/9373082/detect-whether-excel-workbook-is-already-open-using-vba
 
hi hui

i have linked two excel file. if u open one file then automatically second file open and i want that if the second file already open then dont open again. i always get a message "u have already open the said file. do u want to reopen again. reopen will cause some changes....". i dont want that the said file open again and again....i want that the said file open only once.. i didnt get the proper answer in stackflow
 
the linked file is open in an invisible mode and always show this msg "u have already open the said file. do u want to reopen again. reopen will cause some changes...." so please help me out of this so that the file open only once and the above msg doesnt appear


please help me out of this problem as soon as possible
 
@vipulhumein

when you say you didn't get the proper answer, I'm not sure what you mean. The boolean function given lets you know if the workbook is open or not. You should be able to copy that into a module, and then in your code do something like

[pre]
Code:
If IsWorkbookOpen(MyBook) Then
'Don't do anything
Else
Application.Open(MyBook)
End If
'Continue on with code...
[/pre]
 
hi luke

i tried a lot but the message always came that u "u have already open the file .do u want to reopen again"yes or not" ..please help me out so that the file can open once only and the message does not appear


please reply me as soon as possible


thanks
 
Back
Top