Quality Testing

Quality is delighting customers

Need help : How to store runtime variable value into Datasheet ?

Hello everyone,

I want to store runtime result in to datatable. is it possible ?
if yes then how?

For example ,

Dim num1,num2, sum
num1=inputbox ("Enter num1")
num2=inputbox ("Enter num2")
sum= Cdbl (num1) + Cdbl (num2) 'if we want add two strings conversion require
msgbox ("Sum is " &sum)

Now i want to store "sum" result in to data table.

I hope you guys/gals will help me out.

Thanks in advanced.

Regards,
Vishal Shah /-


Views: 389

Reply to This

Replies to This Discussion

DataTable.Value(ParameterID [, SheetID])=sum
DataTable.Value("XXX", dtGlobalSheet) = "textValue"
Thanks, Its done but there is little change in solution given by you.
it should be ,
DataTable.Value("XXX", dtGlobalSheet) = textValue

Thanks dude for your help.

Regards,
Vishal
DataTable("x", dtGlobalSheet) = Sum
Sorry but not working..giving me a error for The set DataTable.Value operation failed. The column does not exist.

Line (6): "DataTable("x", dtGlobalSheet) = Sum".

Dont know why?

P.S. I have renamed column name A to X for this.
I must made some mistake before but now its working for me.

Thanks dude for your help.

Regards,
Vishal
which output value will you choose for this one?
DataTable.SetCurrentRow()
DataTable.Value("NewColumn","Sheet")=sum
Just Add
DataTable.Value ("SUM_Store", dtGlobalSheet)= sum after your last line.
Where SUM_Store will be your column in the Data sheet
Thanks dude for your help.

Regards,
Vishal
Hi Vishal,

Has the DataTable been initialised. If not just rename the 1st column to "Output". Now run the
statement:
DataTable.Value("Output", dtGlobalSheet) = value
Thanks dude.

Regards,
vishal

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service