Excel VBA

2007-09-13 12:20 am
I have create a user form under Excel VBA. But I want this form will automatically prompt out when I open the EXCEL file each time? How can I do that? Or what additional VBA I can set ?

回答 (2)

2007-09-13 5:29 am
✔ 最佳答案
假設你的user form名是 UserForm1
你可以在Microsoft Visual Basic畫面中This Workbook裏輸入以下程式碼。

Private Sub Workbook_Open()
UserForm1.Show
End Sub
2007-09-18 7:00 pm
You can set the the name of marco as auto open for your user form, then the form will be opened automatically. Example as below,

Private Sub auto_open()
UserForm.Show
End Sub


收錄日期: 2021-04-13 13:27:10
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070912000051KK01695

檢視 Wayback Machine 備份