Results 1 to 38 of 38

[SOLVED] Activating Excel Template .xlt

Threaded View

amyxkatexx [SOLVED] Activating Excel... 02-15-2010, 01:43 PM
royUK Re: Activating Excel Template... 02-15-2010, 01:50 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 02:01 PM
royUK Re: Activating Excel Template... 02-15-2010, 02:13 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 02:22 PM
royUK Re: Activating Excel Template... 02-15-2010, 02:23 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 02:27 PM
royUK Re: Activating Excel Template... 02-15-2010, 02:32 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 02:58 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 04:24 PM
shg Re: Activating Excel Template... 02-15-2010, 04:40 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 04:41 PM
shg Re: Activating Excel Template... 02-15-2010, 04:44 PM
royUK Re: Activating Excel Template... 02-15-2010, 04:37 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 04:41 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 04:58 PM
shg Re: Activating Excel Template... 02-15-2010, 05:38 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 05:53 PM
shg Re: Activating Excel Template... 02-15-2010, 05:57 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 06:06 PM
shg Re: Activating Excel Template... 02-15-2010, 06:12 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 06:17 PM
shg Re: Activating Excel Template... 02-15-2010, 06:20 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 06:21 PM
shg Re: Activating Excel Template... 02-15-2010, 06:22 PM
shg Re: Activating Excel Template... 02-15-2010, 06:25 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 06:25 PM
amyxkatexx Re: Activating Excel Template... 02-15-2010, 06:38 PM
shg Re: Activating Excel Template... 02-15-2010, 06:46 PM
royUK Re: Activating Excel Template... 02-15-2010, 07:10 PM
mikerickson Re: Activating Excel Template... 02-16-2010, 10:11 AM
amyxkatexx Re: Activating Excel Template... 02-16-2010, 11:10 AM
mikerickson Re: Activating Excel Template... 02-16-2010, 11:45 AM
amyxkatexx Re: Activating Excel Template... 02-16-2010, 11:51 AM
mikerickson Re: Activating Excel Template... 02-16-2010, 02:32 PM
amyxkatexx Re: Activating Excel Template... 02-16-2010, 02:46 PM
  1. #31
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Activating Excel Template .xlt

    One problem is that the routine uses sExt to build the path string before sExt has been assigned a value.

    This worked on my Mac
    Sub Open_Template()
        Dim wb As Workbook
        Dim sWb As String
        Dim sExt As String
        Const sAppName As String = "MacTemplate"
        Const sPath As String = "Macintosh HD:Users:merickson:Desktop:trying"
       
        Select Case Application.Version
            Case Is >= 12: sExt = ".xltm"
            Case Else: sExt = ".xlt"
        End Select
        
         sWb = sPath & Application.PathSeparator & sAppName & sExt
         
        Set wb = Workbooks.Open(sWb)
    End Sub
    To find your sPath constant, you can use
    Range("a1") = MacScript("choose folder")
    and remove the last ":"

    Or you could try

    Sub trial()
        Workbooks.Open ("MacTemplate.xlt")
    End Sub
    Last edited by mikerickson; 02-16-2010 at 10:45 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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