Results 1 to 4 of 4

Identify with Number If File Open Already

Threaded View

iqballud Identify with Number If File... 04-05-2018, 12:33 AM
LeoTaxi Re: Identify with Number If... 04-05-2018, 04:47 AM
AliGW Re: Identify with Number If... 04-05-2018, 04:48 AM
iqballud Re: Identify with Number If... 04-05-2018, 07:00 AM
  1. #1
    Forum Contributor
    Join Date
    11-17-2013
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    221

    Identify with Number If File Open Already

    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
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Reference number generated when open template excel file.
    By spiderkzn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2018, 05:48 AM
  2. Reference number generated when open template excel file.
    By spiderkzn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-18-2018, 05:48 AM
  3. Identify User who has a File Open
    By Joakim N in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-26-2014, 11:01 AM
  4. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  5. Open Excel File from Number in cell
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2008, 01:48 PM
  6. Error Number 55 (File Already Open)
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2008, 01:04 AM
  7. Open Test file with VBA with a changing file number
    By Michael from Austin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1