|
-
Aug 23rd, 2000, 11:58 AM
#1
Thread Starter
Member
The code below only works for windows nt computer and not a windows 95. Can anyone help me please!!
Private Declare Function APICopyFile Lib "kernel32" Alias "CopyFileA" _
(ByVal lpExistingFileName As String, _
ByVal lpNewFileName As String, _
ByVal bFailIfExists As Long) As Long
Sub CopyFile(SourceFile As String, DestFile As String)
Dim Result As Long
If Dir(SourceFile) = "" Then
MsgBox Chr(34) & SourceFile & Chr(34) & _
" is not valid file name."
Else
Result = APICopyFile(SourceFile, DestFile, False)
MsgBox "Result Code returned (0=file already exists, 1=file copy ok): " & Result
End If
private sub copy_click()
Call CopyFile(App.Path & "\" & "EngineModelProject\16CM32HFO\16CM32HFOPartsCost(60).pdf", Caption & "\" & "16CM32HFOPartsCost(60).pdf")
*The app.path is because that file is on a cd.
On a windows 95 is gives me an error "that file is not a valid filename. But if that was the case then why does it works on windows nt.
Thanks for any help
Jay-B
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|