新建From1(窗体),新建Command1(按钮CommandButton),代码:
Private Sub Command1_click() #If VBA7 Then MsgBox "VBA7" #Else MsgBox "Other" #End If End Sub