Worksheet Save Problem


Posted by Timelord on January 02, 2002 3:06 AM

Hello

Happy New Year!!!

I have data and I have written a Macro that allows the user to save the data and he can choose whatever filename he wants and it will be saved as an xls file.

When that saved file is opened an info box appears and states that this file is linked to the original file and asks wether the data should be updated or not.

Is there a way to save the data without it trying to link to the original file.

Thanks.

Posted by Tom Urtis on January 02, 2002 3:50 AM

Is it that you have an original "source" file, and then a separate "destination" workbook, which you have linked to the source file and which gets saved as a new name and hence still linked to the source file?

If so and your question is how to have the source data appear in the saved as files without formula links (such as paste linking or what have you), then perhaps an import procedure in your Auto_Open or Workbook_Open module could be an option. You could write it so that the data would import whether or not the source file was open or closed, and the procedure is usually very quick and doesn't bother the user with a "link update message" upon opening. You would need to be sure the source file path, file name, and sheet name(s) remain constant; otherwise this may be a way to go.

If I misinterpreted your question, please repost.

HTH

Tom Urtis



Posted by Ian Mac on January 02, 2002 3:52 AM

what about copying and paste special the values before saving.

I've just recorded this for three sheets and work ok for me.

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
Sheets("Sheet1").Activate
Cells.Select
Selection.Copy
Selection.pastespecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

try adding something similar before saving the document, changing the sheet1, 2, 3 to what you need

any help??

Ian Mac