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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ambiguous name error

Status
Not open for further replies.

ixian

Programmer
Jul 13, 2001
128
US
Hi all,

I have got a new problem.

Since that I have a large tvw code, I have made a module for the code.
Now I get an ambiguos name error.

this is my code:
my module
Public Sub PopulateTree(tvwASP As MSComctlLib.Treeview)
Dim myNode As MSComctlLib.Node
Set nodASP = tvwASP.Nodes.Add(, , "ASP", "ASP Code")
nodASP.EnsureVisible

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "App", "Application Object")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App1", "Application.Lock")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App2", "Application.Unlock")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App3", "Application.Value")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App4", "Application_OnStart")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App5", "Application_OnEnd")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App6", "Application.Contents")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App7", "Application.Contents.Remove")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App8", "Application.Contents.RemoveAll")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App9", "Application.Contents.Count")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App10", "Application.Contents.Item")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App11", "Application.Contents.Key")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App12", "Application.StaticObjects")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App13", "Application.StaticObjects.Remove")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App14", "Application.StaticObjects.RemoveAll")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App15", "Application.StaticObjects.Count")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App16", "Application.StaticObjects.Item")
Set nodASP = tvwASP.Nodes.Add("App", tvwChild, "App17", "Application.StaticObjects.Key")

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "ASPE", "ASPError Object")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE1", "ASPError.ASPCode")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE2", "ASPError.Description")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE3", "ASPError.Category")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE4", "ASPError.Column")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE5", "ASPError.Description")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE6", "ASPError.File")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE7", "ASPError.Line")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE8", "ASPError.Number")
Set nodASP = tvwASP.Nodes.Add("ASPE", tvwChild, "ASPE9", "ASPError.Source")

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "Req", "Request Object")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req1", "Request.BinaryRead")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req2", "Request.TotalBytes")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req3", "Request.ClientCertificate")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req4", "Request.ClientCertificate.Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req5", "Request.ClientCertificate.Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req6", "Request.ClientCertificate.Key")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req7", "Request.Cookies")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req8", "Request.Cookies.Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req9", "Request.Cookies.Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req10", "Request.Cookies.Key")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req11", "Request.Cookies()")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req12", "Request.Cookies().Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req13", "Request.Cookies().HasKeys")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req14", "Request.Cookies().Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req15", "Request.Cookies().Key")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req16", "Request.Form")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req17", "Request.Form.Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req18", "Request.Form.Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req19", "Request.Form.Key")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req20", "Request.QueryString")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req21", "Request.QueryString.Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req22", "Request.QueryString.Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req23", "Request.QueryString.Key")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req24", "Request.ServerVariables()")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req25", "Request.ServerVariables().Count")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req26", "Request.ServerVariables().Item")
Set nodASP = tvwASP.Nodes.Add("Req", tvwChild, "Req27", "Request.ServerVariables().Key")

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "Resp", "Response Object")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.AddHeader")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.AppendToLog")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.BinaryWrite")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Clear")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.End")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Flush")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.PICS")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Redirect")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Write")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Buffer")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.CacheControl")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Charset")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.ContentType")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Expires")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.ExpiresAbsolutely")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.IsClientConnected")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "Resp", "Response.Status")
Set nodASP = tvwASP.Nodes.Add("Resp", tvwChild, "RsC", "Response Cookies Collection")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Count")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Item")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Key")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Domain")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Expires")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.HasKeys")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Path")
Set nodASP = tvwASP.Nodes.Add("RsC", tvwChild, "RsC", "Response.Cookies.Secure")

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "Ser", "Server Object")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser1", "Server.CreateObjext")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser2", "Server.Excute")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser3", "Server.GetLastError")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser4", "Server.HTMLEncode")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser5", "Server.MapPath")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser6", "Server.Transfer")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser7", "Server.URLEncode")
Set nodASP = tvwASP.Nodes.Add("Ser", tvwChild, "Ser8", "Server.Timeout")

Set nodASP = tvwASP.Nodes.Add("ASP", tvwChild, "Ses", "Session Object")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses1", "Session.Method")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses2", "Session.CodePage")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses3", "CodePage=")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses4", "Session.LCID")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses5", "LCID=")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses6", "Session.SessionID")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses7", "Session.Timeout")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses8", "Session.Value")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses9", "Session_OnStart")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "Ses10", "Session_OnEnd")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "SnC", "Session Contents Collection")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC1", "Session.Contents.")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC2", "Session.Contents.Remove")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC3", "Session.Contents.RemoveAll")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC4", "Session.Contents.Count")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC5", "Session.Contents.Item")
Set nodASP = tvwASP.Nodes.Add("SnC", tvwChild, "SnC6", "Session.Contents.Key")
Set nodASP = tvwASP.Nodes.Add("Ses", tvwChild, "SSO", "Session StaticObjects Collection")
Set nodASP = tvwASP.Nodes.Add("SSO", tvwChild, "SSO1", "Session.StaticObjects.Remove")
Set nodASP = tvwASP.Nodes.Add("SSO", tvwChild, "SSO2", "Session.StaticObjects.RemoveAll")
Set nodASP = tvwASP.Nodes.Add("SSO", tvwChild, "SnC3", "Session.StaticObjects.Count")
Set nodASP = tvwASP.Nodes.Add("SSO", tvwChild, "SnC4", "Session.StaticObjects.Item")
Set nodASP = tvwASP.Nodes.Add("SSO", tvwChild, "SnC5", "Session.StaticObjects.Key")
End sub

my form:
Option Explicit
Private Sub Form_Load()
Me.Show
PopulateTree Me.tvwASP
End Sub
Private Sub tvwASP_NodeClicked(ByVal Node As Node)
Me.txtEditor.Text = Me.txtEditor.Text & Node.Text & vbCrLf
End Sub

Do I put in all the set statements(in the module) or do I have to put a call function(in the form)?

Aaron
 
In my VERY limited experience, I have had this error several times, I had 2 subs/functions/variables etc named the same IE 2 subs named dothisthing or whatever. I dont know if its the same as your problem, just that i looked for hours for the reason i had that error.
Dragnut
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top