+ Reply to Thread
Results 1 to 12 of 12

Cange final file position

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Cange final file position

    Please Login or Register  to view this content.
    CURRENTLY I AM USING THE ABOVE CODE WHICH CREATS THE FINAL.TXT FILE IN FOLDER DEPUTY IN C DRIVE

    BUT NOW I WANT TO CHANGE MY CODE SO THAT IN THE SAME FOLDER,WHEREVER I HAVE MY EXCEL FILE THE FINAL.TXT FILE SHOULD BE CREATED

    WHEN EVER I RUN THE MACRO OLD FINAL.TXT FILE SHOULD BE REPLACE BY NEW FINAL.TXT WITH A MSG THAT YOUR FINAL FILE HAS BEEN CREATED IN THE SAME FOLDER.

    PLZ HELP I WILL BE GREATFUL.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Cange final file position

    Hi,

    You can use this code :

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    10-03-2010
    Location
    India
    MS-Off Ver
    Excel 2007, 2010
    Posts
    10

    Re: Cange final file position

    Hi Roshan,

    Check out below:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    And what about msg

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Cange final file position

    Hi, patel45,

    your code misses the final backslash for the path.

    @ROSHAN999,
    Wow, you donīt need to use upper case all the time

    Try:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    Very nice working..one more help on this issue

    can in place of final.txt

    a file name can also be customize

    like i want to have it like


    code_etds_new_date (in the file name only the code and date will change)

    in the above when i run the above macro of saving file it should ask me your br code after entering br code it should ask date

    an when we enter date in dd/mm/yyyy
    fomat it sholud should give a file like in the above format...

    For ex if i gave it br code as 4534 and date as 12/03/2103

    the file which need to be save with the name 4534_etds_new_12mar13

    plz help me in this sir ..

    I will be highly obliged...

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    All the file name must be in caps sir...
    Last edited by ROHAN999; 04-22-2013 at 11:56 AM.

  8. #8
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    Its a tiny job for you sir.but will be a great help for me...

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    Is it possible sir..

  10. #10
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Cange final file position

    Hi, ROSHAN999,

    four posts in 8 minutes - I wish I could answer as fast as you hit the submit button.

    Please Login or Register  to view this content.
    All the file name must be in caps


    Ciao,
    Holger

  11. #11
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    OH I AM SORRY FOR THAT BUT SEE MY ANXITY AND CURIOUSNESS AND UNDERSTAND SIR...

    YOUR CODE IS HELPFUL BUT AND THE END AFTER ENTERING CODE AND DATE ERROR MSG COMES

    TYPE MISSMATCH AND HIGHLIGHTS THE LINE strSave = UCase(ThisWorkbook.Path & "\" & strInputCode & "_etds_new_" & Format(DateValue(strInputDate), "ddmmmyy"))

    IN THE CODE

    PLZ SEE AND HELP SIR

  12. #12
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Cange final file position

    Oh wow no problem its done sir

    my fault i have put the date in wrong format

    got that mistake

    many many many thanks to you for this help

+ 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