Inporting and Deleting Sheets

B

Brennan

I have a macro that deletes old sheets from a master workbook and imports the
new sheets containing the updated information. In the master workbook, I
have links to each sheet and when they are delete the old sheets, the link
goes away as well. The new sheets are in the exactly the same format so if
the previous links did work, it would pull the right information. Is there a
way (other than using code to reset the links) to keep the links active as
sheets delete and are replaced?

Thanks for your help!

Brennan
 
G

Gary''s Student

Consider not deleting the old sheets and replacing with new sheets. How
about just refreshing the data in the sheets with data from the most recent
sheets.


(import the data, not the sheets)
 
R

ryguy7272

When you delete those sheets the links are gone...permanently! You will have
to come up with some other method of refreshing, or resetting, the data in
those linked sheets. What is the data source? Why don't you activate the
sheet that the data is imported into, and use some basic code like this:

Sheets("Sheet1").Select
Cells.Select
Selection.ClearContents
'...other stuff down here...


Regards,
Ryan---
 

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