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

Call me1() response.write a Sub m

Status
Not open for further replies.

RushiShroff

Programmer
Jan 23, 2002
216
IN
Call me1()
response.write a
Sub me1()
dim a
a="rushi"
End Sub


is not working ..what to do ?? Rushi Shroff Rushi@emqube.com
"Life is beautiful."
 
Try this:

dim a
Call me1()
response.write a

Sub me1()
a="rushi"
End Sub


 
You just have it the wrong way round.

The below sample will work.

----------------------
Call me1()
Sub me1()
dim a
a="rushi"
response.write a
End Sub
----------------------

Enjoy! - FateFirst
 
You are right bperry,
that means even if Option explicit is set to be off, we need to declare a variable while using it in a subroutine.

Also FateFirst thanks but I needed it outside of Sub Routine. because actually subroutine is being called from multiple places(as per code) and assigned values dynamically.
Anyways thanX !
Rushi Shroff Rushi@emqube.com
"Life is beautiful."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top