假设我有两个Excel文件和一个VBA代码文件:
File1.xlsx
File2.xlsx
Macro.vb
使用Visual Basic我正在尝试创建一个Windows窗体程序,它允许我浏览File1,File2和宏文件。
选择文件后,宏需要使用File1和File2中的数据并更新File1。
这是表格的图片,以及它的代码行。
Public Class frmStuff
Private Sub btnBrowse1_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse1.Click
End Sub
Private Sub btnBrowse2_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse2.Click
End Sub
Private Sub btnBrowse3_Click(sender As System.Object, e As System.EventArgs) Handles btnBrowse3.Click
End Sub
Private Sub txtFile1_Text(sender As System.Object, e As System.EventArgs) Handles txtFile1.Text
End Sub
Private Sub txtFile2_Text(sender As System.Object, e As System.EventArgs) Handles txtFile2.Text
End Sub
Private Sub txtMacro_Text(sender As System.Object, e As System.EventArgs) Handles txtMacro.Text
End Sub
Private Sub btnRun_Click(sender As System.Object, e As System.EventArgs) Handles btnRun.Click
End Sub
Private Sub btnExit_Click(sender As System.Object, e As System.EventArgs) Handles btnExit.Click
End Sub
End Class
是否需要打开Excel文件才能运行宏?
如果可以,我也可以帮助您打开Excel文件。
答案 0 :(得分:0)
我现在遇到的问题,如果我无法解决,我会发布。 干杯无论如何