excel - VBA error 424 object not found, but I have the object -


i'm pretty new vba, learning pretty quickly. have userform called addroute55 , commandbutton inone of sheets activate it.

the code behind commandbutton is:

private sub route55button_click()  addroute55.show  end sub 

where userformcode is:

private sub userform_initialize()  'empty status statusbox.clear  'fill statusbox statusbox     .additem "received"     .additem "returned pm"     .additem "in progress"     .additem "on hold"     .additem "complete"     .additem "closed"     .additem "rfc" end   'empty btbox btbox.clear  'fill btbox btbox     .additem "run"     .additem "change" end  'empty domainbox domainbox.clear  'fill domainbox domainbox     .additem "ams nl"     .additem "ams int"     .additem "eus"     .additem "ips"     .additem "ngc"     .additem "office"     .additem "sm" end  'empty aimsbox aimsbox.value = ""  'empty projectcoedebox projectcodebox.value = ""  'empty pmbox pmbox.value = ""  'empty pobox pobox.value = ""  'empty vendorbox vendorbox.value = ""  'set no ftr default ftrbutton2.value = true  'empty orderreceivedbox orderreceivedbox.value = ""  'empty orderprocessedbox orderprocessedbox.value = ""  'empty ssdmbox ssdmbox.value = ""  'empty p2pbox p2pbox.value = ""  'empty customerbox customerbox.value = ""  'empty pmabox pmabox.value = ""  'empty spbox spbox.value = ""   end sub 

the userform called addroute55 in properties. when press command button, i'm seeing error 424, object not found , refers line of addroute55.show. doing wrong? in advance!

are sure, name , not caption?

if code doesn't work, try this:

private sub route55button_click()          userform1.show     end sub 

you can change name of userform right-clicking on userform in vba-editor in design mode.


Comments