This doesn't mean you can't set values of other variables in a sub though.
When to use a sub or a function ? That depends on what you want. Maybe the WriteRecord sub in my example didn't write out to the screen, but to a file and you wanted to be able to easely retrieve a returnvalue that indicates success or failure of the write. Then you probably would use a function so you could do something like this:
blnSuccess = WriteRecord(recordId)
The code inside the sub/function could be exactly the same except that in the function you would have a line that says something like:
WriteRecord = ...... to set the returnvalue of the function.
im trying to replace this code for active user with a function or sub so the webmaster doesn't have to add new lines when they add new pages. (which one do you think will work better?) ---inc_top.asp-------- If lcase(Right(strOnlinePathInfo, 9)) = "forum.asp" Then strOnlineLocation = "<a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a>" ---------------------- add something like this at the top of each page
what i was trying to say is instead of using these line to detect the page name ---inc_top.asp-------- If lcase(Right(strOnlinePathInfo, 9)) = "forum.asp" Then strOnlineLocation = "<a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a>" ---------------------- why can't we add the info on every page then add something into inc_top.asp to retrive this info so you don't have to add lines like this "If lcase(Right(strOnlinePathInfo, 9)) = "forum.asp" Then" into inc_top.asp each time you make a new page. don't you think that it will speed up the forum? cuz you don't have to compile all those lines, just the current page
Oh...ehm...really have never looked at the Active Users Mods...so don't know if there is a faster/easier way to do that...maybe one of the others knows ?