Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default workbook issue

Hello

I have a workbook A a sheet in which a user entered
information.
What I would like to happen is that when they save
Workbook A, the sheet is saved into workbook B

In other words a user enters stuff in one workbook and the
sheets are stored as a sort of archive in another
workbook, so that workbook A only has one sheet, but B has
many sheets.

Please help!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default workbook issue

Denise
Put this macro in the workbook module of the first file. I called the
first file Alpha.xls and the second file Baker.xls. I called the lone sheet
in Alpha.xls "AlphaSheet". This macro works as follows:
The macro is triggered by the save command to save Alpha.xls.
The macro copies the AlphaSheet and pastes it as the last sheet in
Baker.xls.
The macro then saves Baker.xls.
Note that Baker.xls must be open for this to work.
Watch out for line wrapping in this message. This macro has 6 lines. The
second line starts with "With". The fourth line is a period and one word
".Save".
You access the workbook module by right-clicking on the Excel icon to the
left of the "File" in the menu across the top of the Excel screen, and
selecting View Code. Paste this macro into that module. X-out of the VBE
to return to the worksheet view. HTH Otto
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
With Workbooks("Baker.xls")
Sheets("AlphaSheet").Copy after:=.Sheets(.Sheets.Count)
.Save
End With
End Sub
"DENISE" wrote in message
...
Hello

I have a workbook A a sheet in which a user entered
information.
What I would like to happen is that when they save
Workbook A, the sheet is saved into workbook B

In other words a user enters stuff in one workbook and the
sheets are stored as a sort of archive in another
workbook, so that workbook A only has one sheet, but B has
many sheets.

Please help!




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
shared workbook issue Brendan Quirk Excel Worksheet Functions 0 December 11th 09 06:11 PM
Shared Workbook Issue Steve Excel Discussion (Misc queries) 0 July 31st 08 03:11 PM
Shared workbook access issue havenlad Excel Discussion (Misc queries) 1 January 26th 07 02:51 PM
Shared Workbook issue... NWO Excel Discussion (Misc queries) 3 August 30th 06 10:24 PM
Shared workbook issue??? JohnnyJomp Excel Worksheet Functions 6 April 8th 06 04:40 AM


All times are GMT +1. The time now is 12:13 PM.

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

About Us

"It's about Microsoft Excel"