Help for a newbie pls. I've searched the forum but didn't find any suitable answer.
I’ve created a VB form for use on an Excel 2007 spreadsheet running in compatibility mode.
Amongst other things, I’m data capturing a Surname and the file name of an image already on the hard disk, and writing this to my spreadsheet with loads of other data. This is working fine.
I would now like to add a routine to my save button (which already writes the data to the spreadsheet.) I need it now to create a copy of the file whose name I captured and Append the Surname in front of the existing file name.
So I would data capture
Label Name Data
txtsnam Surname Smith
txtfilenam FileName DSC02345.jpg
I then want a copy of this file created as
Smith_DSC02345.jpg
Working out how to do this is beyond my knowledge & understanding, I can usually work these things out with a few solid hints, but getting the initial start is often beyond me.
My first steps are
Dim savnam As String
Dim newsavnam As String
savnam = ("txtimgno")
newsavnam = ("txtsname" & "_" & "txtfnam" & "_" & "txtimgno")
FileCopy "H:\Doc\Test\V1\[savnam].jpg", "H:\Doc\Test\V1\[newsavnam].jpg"
this isn't working right, but its a start
Can anyone help please.
Thanks
Colin
Bookmarks