Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When using the Forms Control I get an error after packing

Status
Not open for further replies.

jofarrell

Programmer
Mar 21, 2001
178
US
I have been getting an error 458 - Variable uses an Automation type not support in VB. I have checked numerous places and I do not use rich text which is one of the causes of this error. I went and explictly defined all my variables with the only cause of Uer Defined Type I can see that would cause this error is a missing reference for when I use this sub.

Public Sub ClearText(frm As Form)
'Used to clear all text and pertinent labels by passing in the form
'name and tagging labels that are to be cleared
Dim blnNoEvent As Boolean
Dim ctl As Control

For Each ctl In frm.Controls
If ctl.Tag = False Then
GoTo Skip
ElseIf TypeOf ctl Is TextBox Then
ctl.Text = ""
If ctl.Tag = "tcl" Then
ctl.Visible = False
End If
End If
If TypeOf ctl Is Label And ctl.Tag = "clf" Then
ctl.Caption = ""
End If
If TypeOf ctl Is CheckBox And ctl.Tag = "ccb" Then
ctl.Value = vbUnchecked
ctl.Visible = True
ElseIf TypeOf ctl Is CheckBox And ctl.Tag = "cckb" Then
blnClearForm = True
blnNoEvent = True
ctl.Value = vbUnchecked
blnClearForm = False
End If
Skip:
Next ctl

End Sub

It has worked in other applications I have deployed and I have checked references and they seem to be the same. I have re-registered dll's, run the VB6Cli.exe for lisencing and distribution, ran the DCOM98.exe and MDAC_TYP.exe, I have reinstalled Office 97 ... and I am still at a loss.

If anyone has any idea of what references I can make (and I am assuming that this is the problem I do not know for sure because it runs in complied mode and also I can run the executable on my development computer, just not another non development computer) I would be greatly appreciative. I am at my wits end and have applications only I can enjoy *grin*

Joanne
 
I have been continuing to search for an answer on this and can find many questions on this matter but no solutions. Has anyone seen a place where a solution was given?

Joanne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top