Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reseting an editable table to show default values again on a button click

Hi Everyone, I have created an editable table using INPUTFIELD and INPUTSUM. By default the table shows the values from the XL sheet. But, when user edited the values in the table, the new values gets permanantly stored in that cell, even if I reload the script or even if I closed and reopen the QVW file. As per the requirement, I have to place a RESET button on the sheet, and on a button click I want to reset the table, so that it will again show the default values. It will be a great help if anybody guide me and help me out to achieve this. Regards.

1 Solution

Accepted Solutions
Not applicable
Author

you can write a macro to reset the value. Right click on the Input Field column, you got the option to reset the values. The same in API, you can find the scripts.

View solution in original post

2 Replies
Not applicable
Author

you can write a macro to reset the value. Right click on the Input Field column, you got the option to reset the values. The same in API, you can find the scripts.

Not applicable
Author

Thanks Rajesh,

It worked for me. I have done it by calling macro on a button click.

I called the following macro on a button click, putting here if anybody wants it.

sub Reset

dim x(1)

x(0) = 0 ' element to reset

set fld = ActiveDocument.Fields("inputfield_name")

fld.ResetInputFieldValues 0, x

end sub

Best Regards.