+ Reply to Thread
Results 1 to 7 of 7

VBA not saving template

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Swindon, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    VBA not saving template

    Hello and merry Christmas.

    I have a template which with a lot of help on from members which saves a spreadsheet with the next sequential number (by adding a number to the relevant square in the template file). This worked great until I made some changes to it! Everything still works as I need it to except it doesn't seem to update the template number therefore every time I run the template it gives the next file the same number. I cannot figure out why this so any help would be gratfully accepted!

    Regards

    Mick


    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA not saving template

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-31-2011
    Location
    Swindon, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: VBA not saving template

    Thanks for the reply: The problem I'm having is with the template. it should (and used to) increase the number by 1 in J2 each time the macro was run and save the new number. (so that when the macro was used next it gave the next sequential No) everything works as I need it to apart from the no in J2 in the template being incremented.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA not saving template

    Hi micky,

    Is your Template really a template extension .xltx??

  5. #5
    Registered User
    Join Date
    03-31-2011
    Location
    Swindon, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: VBA not saving template

    Hi xladept
    My template is a macro enabled template .xltm. again it all appears to work except that it wont save the updated no on the template. it might be that activeworkbook reference that's wrong? unfortunately I don't understand enough about vba to solve it!

    Thanks for getting back to me.

  6. #6
    Registered User
    Join Date
    03-31-2011
    Location
    Swindon, England
    MS-Off Ver
    Excel 2016
    Posts
    31

    Re: VBA not saving template

    I Found the error it needed to have ,editable = true after the path to open the template!

    Please Login or Register  to view this content.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA not saving template

    Good to know! Glad you got it

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. CSV file created from template is not saving to same location as the template.
    By SGALLAG1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2012, 11:26 AM
  2. Replies: 0
    Last Post: 02-28-2012, 11:40 AM
  3. Saving:template file
    By burgerboy2k6 in forum Excel General
    Replies: 0
    Last Post: 03-03-2007, 09:18 PM
  4. saving template
    By Marlis in forum Excel General
    Replies: 3
    Last Post: 09-10-2005, 08:07 PM
  5. [SOLVED] Saving CSV to a template
    By Josh O. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2005, 08:06 PM

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