How can I make the copied range from another worksheet independently

S

sam

Hi,

I have two worksheets on one workbook. One named 'main page', the other
one is 'template page' which includes some table template inside. In
the main page, based on diifferent option button choice, different
table template in 'template page' will be copyed into main page.
I write some VBA code to realize this function. This works fine. The
code is as follows.

If Worksheets("Main page").OptionButton1.value = 1 Then
Worksheets("Template page").Range("L7:M19").Copy
Destination:=Worksheets("Main page").Range("E10")
Else
If Worksheets("Main page").OptionButton2.value = 1 Then
Worksheets("Template page").Range("D7:E19").Copy
Destination:=Worksheets("Main page").Range("E10")
End If
End If

The table templates in the worksheet 'template page' contain some check
boxes. After the option button on the main page is seleced, the
corresponding table template will appear on main page. Then I selected
some check boxes in the table template copied from 'template page' on
the main page. Now, I want to save this book with those selected check
boxes. It could save. However, when I open this saved workbook again,
the value of those check boxes on main page are still false(which
should be true).

Do you have idea to solve this problem?How can I make the copied table
template independently on the main page? Thank you in advance!!!

Best Regards

Sam
 
M

mrice

Hay you tried linking the checkbox to a cell. The value of the cell
should save OK and regenerate the value in the checkbox on re-opening.
 

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

Top