我在2008年VSB创建了一个全球倡议(容易部分),有两箱案文(一个是选择目标Excel文档,另一个是选择目的地Excel文档)。 这两份文件都有一个浏览量纽吨(用于选择浏览文档——阅读)。 此外,我还有另外两箱文字箱,再用到中点,以容纳浏览量和栏目(如果用户想要复制61-6和A-D栏,他们就会在第一盒中进入1-6,而A-D在第二盒中。) 最后, 我在德国马克底部有一顿影印件,一旦所有领域都拥有相关数据,就将印刷选定的电池。 关于如何复制一个囚室或一系列囚室,通过将用户带入一个号码和一栏,以及如何实际执行复制这些囚室的逻辑,对Im进行了辩驳。 我看到了一些例子,但我未能成功地将其应用于我的特别申请。 任何帮助都值得赞赏。 感谢!
VS 2008 VB Code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
Dim strm As System.IO.Stream
strm = OpenFileDialog1.OpenFile()
TextBox1.Text = OpenFileDialog1.FileName.ToString()
If Not (strm Is Nothing) Then
strm.Close()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim selectedFile As String = String.Empty
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
selectedFile = OpenFileDialog1.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim selectedFile As String = String.Empty
If OpenFileDialog2.ShowDialog = Windows.Forms.DialogResult.OK Then
selectedFile = OpenFileDialog2.FileName
End If
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub OpenFileDialog2_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog2.FileOk
Dim strm As System.IO.Stream
strm = OpenFileDialog2.OpenFile()
TextBox2.Text = OpenFileDialog2.FileName.ToString()
If Not (strm Is Nothing) Then
strm.Close()
End If
End Sub
Private Sub CopyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Copy_Btn.Click
End Sub
End Class