- ©«¤l
- 31
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 59
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2013-4-4
- ³Ì«áµn¿ý
- 2013-9-2
|
¥Ø«e¬ã¨s¥X¿ï¨ú§¨±aÀɮ׸ô®|¬°¡G- Sub Import1()
- Dim fd As FileDialog
- Set fd = Excel.Application.FileDialog(msoFileDialogFilePicker)
-
- fd.Filters.Add "Excel File", "*.xls*" 'set the catch function
- fd.Filters.Add "Word File", "*.doc*"
- fd.Filters.Add "Txt File", "*.txt*"
- fd.Filters.Add "all files", "*.*"
-
- fd.Show 'show the dialog window
-
- For i = 1 To fd.SelectedItems.Count
- strFullName = fd.SelectedItems(i)
- Sheet1.Cells(i, 1) = strFullName 'appear the selection file name
-
- n = rinstr(strFullName, "\")
- Next
- End Sub
- Function rinstr(ByVal t As String, ByVal s As String)
- 'search the last string position
- Dim i As Integer
- Dim n As Integer
- n = 0
- For i = 1 To Len(t)
- If Mid(t, i, 1) = s Then
- n = i
- End If
- Next
- rinstr = n
- End Function
½Æ»s¥N½X ¥Ø«e´¡¤J¸ô®|ªº¦ì¸m¬°a1¡A½Ð°Ýn¦p¦ó«ü©w´¡¤JªºÀx¦s®æ¦ì¸m©O?ÁÂÁ |
|