Hi Avinash Singh,
I'm not sure if your Script is correct but here's some guidelines you might check for the below error.
Error: Name '<name>' is not declared. It may be inaccessible due to its protection level.
To correct this error:
1. Check the spelling of the name in the referring statement. Visual Basic is case-insensitive, but any other variation in the spelling is regarded as a completely different name. Note that the underscore (_) is part of the name and therefore part of the spelling.
2. Check that you have the member access operator (.) between an object and its member. For example, if you have a TextBoxcontrol named TextBox1, to access its Text property you should type TextBox1.Text. If instead you type TextBox1Text, you have created a different name.
3. If the spelling is correct and the syntax of any object member access is correct, verify that the element has been declared.
4. If the programming element has been declared, check that it is in scope. If the referring statement is outside the region declaring the programming element, you might need to qualify the element name.
Hope this helps.