Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    A Macro That Runs Automatically? (2000)

    The following code is located in a module in my Personal.xls file:

    Public Sub InsertFileNameWithPathInWindow()
    ' Changes window title to include path with filename
    ' Check if any child windows open (avoid error if no active window)
    If Windows.Count > 0 Then
    ' Change the window's caption
    Application.Caption = ActiveWorkbook.FullName
    If ActiveWindow.WindowState = xlMaximized Then
    ActiveWindow.Caption = " "
    Else
    ActiveWindow.Caption = ActiveWorkbook.FullName
    End If
    End If
    End Sub

    As such, I must run the macro for the result to occur-show the filename in the "window" above the toolbar. What I would like to do is have the macro automatically run everytime I open an Excel file.
    Any help out there?
    Thanks in advance,
    Jeff

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: A Macro That Runs Automatically? (2000)

    Try this <post#=168387>post 168387</post#>

    Steve

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: A Macro That Runs Automatically? (2000)

    Yep-does the trick-thanks (I knew something was out there somewhere!)
    Jeff

Posting Permissions

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