What code? How much earlier? Are the proper object library references set?
What do you mean by "not work"? Error messages? (which ones), nothing
happens? unexpected things happen? nothing happens?
There are probably an infinite number of answers to your very broad
question. If you'd like to provide more information, someone might be
willing to assist. If your question was rhetorical, have a nice weekend.