Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default copy workbook and update

Hi

I have workbook with approx 20 sheets

I want a copy of this workbook, and when I update the origonal, this new
workbook will update

Is this possible ?

regards

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200902/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default copy workbook and update

Hi,
You can create a macro that when closing the workbook will create a copy of
it, need help with the macro just let me know

"BNT1 via OfficeKB.com" wrote:

Hi

I have workbook with approx 20 sheets

I want a copy of this workbook, and when I update the origonal, this new
workbook will update

Is this possible ?

regards

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200902/1


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default copy workbook and update

thanks for the speed response

One file would only be edited by myself, this would be the secure data, and
the other file would be able to be edited by another person, after my update.


Not sure if this will work for me?

Any ideas???



Eduardo wrote:
Hi,
You can create a macro that when closing the workbook will create a copy of
it, need help with the macro just let me know

Hi

[quoted text clipped - 6 lines]

regards


--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default copy workbook and update

The easiest way is to use SaveCopyAs to create a copy of the workbook
as it is at some point in time. Even if the original workbook is
closed without saving changes, the workbook created with SaveCopyAs
will have the changes. E.g.,


Sub SaveCopy()
Dim FName As String
Dim N As Long
If ActiveWorkbook.Path = vbNullString Then
Exit Sub
End If
FName = ActiveWorkbook.FullName
N = InStrRev(FName, ".")
FName = Left(FName, N - 1) & "_COPY" & Mid(FName, N)
On Error Resume Next
Kill FName 'delete existing copy file
On Error GoTo 0
ActiveWorkbook.SaveCopyAs Filename:=FName
End Sub

You can automate this my putting the following code in the same code
module as SaveCopy:

Sub Auto_Close()
SaveCopy
End Sub

Thus, you can save a copy whenever you want, and automatically save a
copy with the workbook is closed.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Tue, 03 Feb 2009 18:49:40 GMT, "BNT1 via OfficeKB.com" <u19326@uwe
wrote:

Hi

I have workbook with approx 20 sheets

I want a copy of this workbook, and when I update the origonal, this new
workbook will update

Is this possible ?

regards

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default copy workbook and update

thanks chip

Tried this but it does overide the copy when i run macro, which i was trying
to avoid

Put simply, once copy new worksheet created, any new info put into origonal
would transfer to other workbook. That new workbook could be amend at will
for non essential data and not effect original data?

Possible??

Chip Pearson wrote:
The easiest way is to use SaveCopyAs to create a copy of the workbook
as it is at some point in time. Even if the original workbook is
closed without saving changes, the workbook created with SaveCopyAs
will have the changes. E.g.,

Sub SaveCopy()
Dim FName As String
Dim N As Long
If ActiveWorkbook.Path = vbNullString Then
Exit Sub
End If
FName = ActiveWorkbook.FullName
N = InStrRev(FName, ".")
FName = Left(FName, N - 1) & "_COPY" & Mid(FName, N)
On Error Resume Next
Kill FName 'delete existing copy file
On Error GoTo 0
ActiveWorkbook.SaveCopyAs Filename:=FName
End Sub

You can automate this my putting the following code in the same code
module as SaveCopy:

Sub Auto_Close()
SaveCopy
End Sub

Thus, you can save a copy whenever you want, and automatically save a
copy with the workbook is closed.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

Hi

[quoted text clipped - 6 lines]

regards


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200902/1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Excel-how to link source workbook to copy of destination workbook D Lynn Excel Worksheet Functions 1 May 29th 08 05:36 PM
Can one workbook/sheet update another workbook? jtpryan Excel Discussion (Misc queries) 0 November 13th 07 03:56 PM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Worksheet Functions 0 August 1st 07 07:43 PM
auto update of copy of workbook Al Excel Worksheet Functions 0 December 14th 05 02:21 PM


All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"