展开全部
Ok了,试了岩笑盯一下,可粗和以实现。代码如下:(新建一个Text1,运行后输入升戚x可以看到效果) Private Declare Function EbExecuteLine Lib "vba6.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long Public x As Long Public r As String Public Function ExecuteLine(sCode As String, Optional fCheckOnly As Boolean) As Boolean ExecuteLine = EbExecuteLine(StrPtr(sCode), 0&, 0&, Abs(fCheckOnly)) = 0 End Function Private Sub Form_Load() ExecuteLine "x=60" End Sub Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer) ExecuteLine "r = TypeName(" & Text1.Text & ")" ExecuteLine "If r <> ""Empty"" Then Form1.Text1.Text = " & Text1 End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询