Hi,
I have an ActiveX text box in my Excel document. I'm trying to restrict the data type to numbers, so I added code. Even after making sure that the required References were added (Microsoft ActiveX Data Objects 6.1 Library), I'm still receiving the following error message: "Compile error: Method or data member not found". I have Microsoft Office 2016 32-bit and Windows 2007.
On a separate note, it seems that ActiveX controls are not the best. Is there a better way to creating forms for Excel models?
Thank You,
Nick
I have an ActiveX text box in my Excel document. I'm trying to restrict the data type to numbers, so I added code. Even after making sure that the required References were added (Microsoft ActiveX Data Objects 6.1 Library), I'm still receiving the following error message: "Compile error: Method or data member not found". I have Microsoft Office 2016 32-bit and Windows 2007.
On a separate note, it seems that ActiveX controls are not the best. Is there a better way to creating forms for Excel models?
Code:
Private Sub txt_targeted_profit_margin_Change()
OnlyNumbers2
End Sub
Private Sub OnlyNumbers2()
If Not Me.ActiveControl Is Nothing Then
MessageBox.Show (Me.ActiveControl.Name)
End If
End Sub
Thank You,
Nick