+ Reply to Thread
Results 1 to 2 of 2

Problem with Windows(Name of the file).Activate

  1. #1
    Registered User
    Join Date
    04-29-2004
    Posts
    11

    Problem with Windows(Name of the file).Activate

    Hi,

    When i'm opening files using Workbooks.Open Filename:=, the file is opened in a "new" excel. Instead of having one excel icon in my windows bar at the bottom of teh screen I have two icons.

    So, the problem is that I can't switch from a file to an other using Windows(Name of the file).Activate

    is there any solution to that ?

    Many thanks in advance,

    Greg

  2. #2
    Registered User
    Join Date
    04-29-2004
    Posts
    11
    Here is my code :
    As you can see I need to switch between Windows(VarFileName).Activate and Windows("os_summary.xls").Activate to copy paste values.
    Is there an other solution ?

    VarOSMacroPath = "C:\Documents and Settings\Gregory\Bureau\MacrosBK\"
    VarUnrealizedPath = "C:\Documents and Settings\Gregory\Bureau\MacrosBK\"
    VarFileName = (ThisWorkbook.Name)


    Sheets("DATAS OS").Select
    Range("A2:O2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Application.CutCopyMode = False
    Selection.ClearContents


    Workbooks.Open Filename:= _
    VarOSMacroPath & "os_summary.xls", _
    Notify:=False
    Sheets("FUND TABLE").Select
    Application.Run ("'os_summary.xls'!Get_BM")
    Sheets("RESULTS").Select

    Range("I16:W16").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy

    Windows(VarFileName).Activate
    Sheets("DATAS OS").Select
    Range("A2").Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Windows("os_summary.xls").Activate
    Application.CutCopyMode = False
    ActiveWindow.Close (True)
    Application.CutCopyMode = False
    Windows(VarFileName).Activate
    Sheets("DATAS").Select

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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