adding session variables

R

rob

Hi all,

Very simple question, is it possible to add the contents of session
variables?
for example I have 2 session variables, product1 & product2 , if I try and
add them I get a "type mismatch" error.

i.e. total = session("product1") + session("product2")

I've tried session("product1").contents or session("product1").value then I
get an error of "object required".

Any ideas?
TIA
Rob
 
A

Aaron Bertrand [MVP]

Are they integers, decimals, ???

You could try

total = clng(session("product1")) + clng(session("product2"))
 
R

rob

Thanks, I cant belive I forgot that function, I was working with decimals
so I'm using the Ccur one instead.
Thanks for getting me on the right track. :eek:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top