I am having trouble using "FileCopy." The specific file being copied is the file that listed in the textbox and it will always go to the same directory. I assigned variable Destination to "c:test" and SourceFile to "file1.filename." I am getting error number 56.
Dim SourceFile As String
Dim Destination As String
Private Sub File1_Click()
txbFileName.Text = File1.filename
SourceFile = File1.filename
Private Sub cmdSend_Click()
FName = txbFileName.Text
FileCopy SourceFile, Destination
In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.