Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB 中的改變磁碟.....不會用啦.....cry!!

0 views
Skip to first unread message

小翰

unread,
Oct 18, 1997, 3:00:00 AM10/18/97
to

※ 引述《Jaric (小翰)》之銘言:
: ※ 引述《Jian...@redbbs.cc.ntut.edu.tw (無印良品無良)》之銘言:
: : 請問:
: : VB4 中使用 chdir(還是 chdrive )...忘了
: : 改變到沒有放入磁片的磁碟中....例如b: a:
: : 會出現 runtime error 如何才能避免
: : ...........謝謝
: Private Sub Drive1_Change()
: On Error Resume Next
: Dir1.Path = Drive1.Drive
: If Err.Number > 0 Then
: Dir1.Path = "c:"
: End If
: End Sub

上面是控制項的寫法,可能不是你要的,試試下面的
On Error Resume Next
ChDrive "a:"
If Err.Number > 0 Then
ChDrive "c:"
End If

--
有空可以到我的HomePage
http://www.taconet.com.tw/~Jaric/index.htm
裡頭有每週更新一次的VB筆記本(Last Update 10/18/97)
還有台灣科技大學化工系三年級學生可能需要的
化學技術實習 數據處理系統

--
※ 來源:台灣科技大學BBS(bbs.et.ntust.edu.tw) ◆來自: 140.118.31.156

0 new messages