+ Reply to Thread
Results 1 to 6 of 6

Save as In sequence

  1. #1
    Registered User
    Join Date
    06-16-2007
    Posts
    10

    Save as In sequence

    Hi all,

    I have searched these forums (the answer is prob in here somewhere prob missed)

    anyway

    All I want is to automate a sequential number in only 1 cell. This is the code I have.
    Please Login or Register  to view this content.
    All good and it works , but. There is alot of amending out at work, and with the above code you ...type ya info in print then save close etc. Open the next one and the number has changed all good. So when I have to go back open the file and amend a stuff up or something, it'll add another number onto it so in other words. It was ment to be 10000 it is now 10001. (It’s easy enough for me to fix cause I'll know it has changed the number automatically) but if some else fixes a mistake , they wont even look at the docket number as it wasnt wrong in the first place, until it was reopened.

    It would be also good if I could get a file saveAS going as well (that would change in sequence with the docket number)is this even possible?? I know you can make it save AS "blahblah.xls" but can I get it to change in line as well? i.e blahblah10001.xls

    So all I’m after is.....how do you stop it from adding on that extra numbers (or even with auto time and date) but how can I get them to stop updating when I REopen the file.

    here is the link to a demo file..
    http://files-upload.com/305378/Copyo...10000.zip.html
    unprotect sheet password is password

    Thanks In advance,
    Damo


    edit> Sorry
    Last edited by DJarqus; 06-17-2007 at 04:15 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please read forum rules below and then wrap your code

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    How about having a MsgBox appear at the appropriate time asking "OK to Incriment number?" The first users would say OK, the fixers-of-error would say No.

  4. #4
    Registered User
    Join Date
    06-16-2007
    Posts
    10
    ok I've got the auto save as down. Thanks to Henry83's thread and Mudraker's reply.

    Please Login or Register  to view this content.
    It comes up with a debug if I select ("no" I don't want to save a file). Is there more code I could add to just exit if i select no i.e and if. or any how to's anywhere.

    But I'm still stuck on how to stop cell "J8" from auto-updating it's self when amending a file. This is also the case for dates and times.

    Mikerickson idea seems like a good one just need to know how to do it

    Thanks,
    DJ

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Somewhere in the auto-incriment code is a line that says the equivilant of
    Please Login or Register  to view this content.
    replace that line with
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-16-2007
    Posts
    10

    Question

    Ok thank guys all has helped so far.

    I have also added more to the code but doesn't work. But it also doesn't come up with any errors.

    a) When I select on the msgbox "yes" "Would you like to amend this document".
    1. it should not increment the docket number(which it doesn't,so all good)
    2. it should not change the original date and time(it's coming up with true/false values))

    b) When I select on the msgbox "no" "Would like to amend this document."
    1. it should increment the docket number (which it does, so all good)
    2.it should change the original date and time(It's coming up with true/false values))

    All I need it to do now is.

    How do I fix the time and date functions when creating(to change) or amending(remain as is) a docket.

    Please Login or Register  to view this content.
    Must be missing something small

    Thanks,
    DJ
    Last edited by DJarqus; 06-18-2007 at 05:12 PM.

+ 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