copying many controls

C

Charlie

I'm going to have many controls that get their values from sheet1, all on a
multipage. Then I'll have sheet2, & sheet3, and also pages on the multipage
that are identical to the first page, except they get their data from sheet2,
sheet3. Their are 40-50 controls each page, each page identical, just using
a different sheet, which are identical. Can I 'copy' one page to the next,
only changing the sheet that is referenced, rather than having to make the
sheet ref change on 40-50 controls?
 
J

Joel

You may havve to write simple macro like the one below

Sub test3()

For Each shp In ActiveSheet.Shapes
If shp.Type = msoOLEControlObject Then
Link = ActiveSheet.OLEObjects(shp.Name).LinkedCell
Link = Replace(Link, "Sheet1", "Sheet2")
ActiveSheet.OLEObjects(shp.Name).LinkedCell = Link
End If
Next shp
 

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