Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i am able to read my table using macro -
Sub ReadStraightTable
Set Table = ActiveDocument.GetSheetObject( "CH05" )
For RowIter = 1 to table.GetRowCount-1
For ColIter = 2 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
MsgBox(cell.Text)
Next
Next
End Sub
now i want to calculate irr in table box but im not getting how to pass table values from macro above to the table box properties to calculate irr. any help would be thankful.
It would be easier without a macro
Which expression is inside your CH05 object?
yes but i want to get it done by macro. it should work like the macro will copy values from chart into a variable and then that variable can be used in text box.
the table is holding values which are not static , they are dynamic i.e. value keeps on changing.
Maybe someone can help you with your macro so.
Good luck
clever can you help me with how to script in macro to copy values from chart to a variable??
Hi Skid,
How you want to store the values in variable.? I have not used this before, so any expected output will be helpful for me to help you further.
Use SetContent method
set v = ActiveDocument.Variables("yourvar")
v.v.SetContent "0", True
Try to avoid Macro. First try to solve the problem with Clever solution or else someone help you
hello Nagraj
this is the link what im looking to do. I have a table with that changes so want to read straight table by macro and then have to pass it to varaible so i can create a text box to calculate irr. for reading from table i used macro code as -
Sub ReadStraightTable
Set Table = ActiveDocument.GetSheetObject( "CH05" )
For RowIter = 1 to table.GetRowCount-1
For ColIter = 2 to table.GetColumnCount-1
set cell = table.GetCell(RowIter,ColIter)
MsgBox(cell.Text)
Next
Next
End Sub
this gives me the reading of table only, now i want this table values to be given to a variable so i can proceed further.
thanks for ur reply
it cannot be done without macro.