+ Reply to Thread
Results 1 to 5 of 5

file operations - need some help

  1. #1
    Registered User
    Join Date
    11-30-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    54

    file operations - need some help

    Hi,

    I would need to do some file operations when using form in Excel.

    I need to:
    1) Get path of file specified by user (jpg) - This I can do

    The following I do not know how

    2) Copy this file to another location with another file name
    3) Create new text file with specific name
    4) Append text to text file

    Could you point me to appropriate help chapter (I honestly can not find anything that would match this tasks) and give me some clues on how to cope with this.

    Regards,
    Cris

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: file operations - need some help

    You can do this sort of stuff with filesystemobject:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-30-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    54

    Re: file operations - need some help

    Thanks,

    Is there a place where I can find a list o methods available for filesystemobjet in Excel VBA?
    Or will it be the same list of methods as for FileSystemObject in reference for Windows Scripting available at:
    http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx

    Cris

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: file operations - need some help

    Yeah it's the same.

  5. #5
    Registered User
    Join Date
    11-30-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    54

    Re: file operations - need some help

    Hi,

    I had made some progress but still did not managed to get tins work.

    I have a problem with coping file.
    I used this example as base.

    http://msdn.microsoft.com/en-us/libr...=vs.84%29.aspx

    my code is:

    Please Login or Register  to view this content.
    The file gets copied but I have problem with it's filename.
    As you can see filename is created out of a number and I want it to be formmated 0000.00.jpg (for easy sorting in directory). Corresponding number is stored in excel cell (this is a database, and jpg are pictures of things in it). After coping filename is 0000,00.jpg (with coma "," instead of dot). Coma was placed by format function as decimal separator and I know it can be changed with /. but will I have a problem when I will try to get appropriate picture to form image?

    I suppose I can have problem if decimal separator in application options will be set to . instead of , that is on my computer.
    Also will this second dot "." in the filename be a problem when fileextension is in question?

    Cris.
    Last edited by kmeld; 12-12-2013 at 07:19 AM.

+ 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. Data And control operations from a closed file
    By ravinder_tigh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2009, 04:35 AM
  2. Perform 2 Operations as an AND
    By Matt12 in forum Excel General
    Replies: 2
    Last Post: 07-13-2008, 04:55 PM
  3. OWC operations in Excel
    By mondayisgreat in forum Excel General
    Replies: 0
    Last Post: 03-03-2006, 11:07 AM
  4. If operations again
    By MIKE0W in forum Excel General
    Replies: 3
    Last Post: 03-24-2005, 02:51 PM
  5. logic operations
    By MIKE0W in forum Excel General
    Replies: 2
    Last Post: 03-24-2005, 01:15 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