macro 기능 추가 중. 엑세 업로드 양식 추가 예정
This commit is contained in:
38
ArinWarev1/Forms_Basic/frm_Macro.vb
Normal file
38
ArinWarev1/Forms_Basic/frm_Macro.vb
Normal file
@@ -0,0 +1,38 @@
|
||||
Public Class frm_Macro
|
||||
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btPath.Click
|
||||
Dim fd As New FolderBrowserDialog()
|
||||
If fd.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
tbPath.Text = fd.SelectedPath
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles btcalc.Click
|
||||
'//calc
|
||||
Dim di As New System.IO.DirectoryInfo(tbPath.Text)
|
||||
If di.Exists = False Then
|
||||
MsgBox("no folder")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim files1() As System.IO.FileInfo
|
||||
Dim files2() As System.IO.FileInfo
|
||||
|
||||
files1 = di.GetFiles("*.tpl", IO.SearchOption.TopDirectoryOnly)
|
||||
files2 = di.GetFiles("*.tplx", IO.SearchOption.TopDirectoryOnly)
|
||||
|
||||
If files1.Length < 1 AndAlso files2.Length < 1 Then
|
||||
MsgBox("no file")
|
||||
Return
|
||||
End If
|
||||
|
||||
|
||||
DialogResult = Windows.Forms.DialogResult.OK
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frm_Macro_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user