Results 1 to 3 of 3

Thread: Renaming an External File

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    3

    Renaming an External File

    Hi,

    I have an access database and in the VB code I want to rename an external file. ie. a text file on my c:\ drive is called 'test.txt' and i then want to rename it via vba to 'complete.txt'.

    Anyone know how this is done, or if I need to make sure I have a correct library registered etc.?

    Thanks

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    I'm not sure if it's the same in VBA, but in VB this would do it:

    VB Code:
    1. Name "C:\test.txt" as "c:\complete.txt"

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Posts
    3
    Originally posted by si_the_geek
    I'm not sure if it's the same in VBA, but in VB this would do it:

    VB Code:
    1. Name "C:\test.txt" as "c:\complete.txt"
    works, thanks very much. thought i tried that but obviously not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width