+ Reply to Thread
Results 1 to 3 of 3

Personal vba - interaction xls/xlt

  1. #1
    Registered User
    Join Date
    09-23-2004
    Posts
    65

    Personal vba - interaction xls/xlt

    Following code does not work when I put it in my PERSONAL folder in VBA

    It works when I see both source and destination xls/xlt in the VBA explorer.


    What should I change about the code to make it work?

    '=============================================
    Sub ExportSORTSTARS()
    Dim originWorkbook As Workbook
    Set originWorkbook = ActiveWorkbook
    Dim newSheet As Worksheet
    sheetS("SS").Activate
    Cells(1, 1).Activate
    Cells.Select
    Selection.Copy
    Windows("SS0.xlt").Activate
    Set newSheet = Worksheets.Add
    newSheet.Name = "SS"
    Cells(1, 1).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
    newSheet.Visible = False
    Application.CutCopyMode = False
    originWorkbook.Activate
    End Sub

  2. #2
    Registered User
    Join Date
    09-23-2004
    Posts
    65
    Anyone an idea?

    It works when opening the template first, and opening it's VBA environment. Then opening the xls workbook and it's VBA environment. Only then I get access to the code of both xls and xlt through the same window. And only then it works.

    In other cases, the object SS.xlt is not found.


    Any help on this topic?


    Thank you

  3. #3
    Registered User
    Join Date
    09-23-2004
    Posts
    65
    Maybe suggestions off ways to search how to solve it...

    anything?

+ 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