Quantcast
Viewing latest article 1
Browse Latest Browse All 7

Re: The unusual task - the table and files with images

xavi wrote:

to Copy and rename this picture on the second column (code)
Problem in that  what to do.

As pitch - sm more low (I so normally do). A cycle  on sheet with names and instead of names of files in an example you will build of values of appropriate cells.
Method Copy
objFile. Copy Destination [OverWrite]
Fulfills copying of the specified file from one place on another. Method Copy is identical to the operation executable by means of FileSystemObject. CopyFile where the file to which the object refers, is transferred as parameter. However pay attention that the alternative method gives the chance copyings of several files
Method Copy contains following elements:
Element the Description
objFile Mandatory. Always object name File
Destination Mandatory. A line defining a place where the file is copied. Application of characters of templates is not authorized
OverWrite Optional. Value of type Boolean. If element OverWrite matters True (it is used by default) record to the place of existing files is authorized; otherwise value False. Pay attention that if the destination specified by element Destination, has the installed read-only attribute, method Copy cannot produce copying, irrespective of value of parameter OverwriteFiles
Example

' we Copy a file in other folder
Dim f
Dim fso As FileSystemObject
Set fso = CreateObject ("Scripting. FileSystemObject")
Set f = fso. GetFile ("C:\autoexec.bat")
f. Copy "c:\windoss\test.txt"
MsgBox "Copying is completed"

Viewing latest article 1
Browse Latest Browse All 7

Trending Articles