northernbeaver
Programmer
Im trying to copy a file from one location to another on a click of a button. Im running access 2000. I have tried using the following code
but when I try to run the code I get the error "user defined type not defined" I assume that means I have to have something referenced in my references. the app that Im creating will eventually be distributed on cd so I have to be carefull as to what I use to copy the file. is there a better way?
Code:
Dim fs As New Scripting.FileSystemObject
Set fs = New FileSystemObject
strFilter = ahtAddFilterItem(strFilter, "CAD DWG (*.DWG)", "*.DWG")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=False, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
fs.CopyFile Me.CadLink, strInputFileName
but when I try to run the code I get the error "user defined type not defined" I assume that means I have to have something referenced in my references. the app that Im creating will eventually be distributed on cd so I have to be carefull as to what I use to copy the file. is there a better way?