Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Invoking 'BeforeSave' from macro in another Workbook

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    - I have a Workbook 'A' that contains a macro, which places data into Workbook 'B'.
    (Note that both Workbooks are loaded in Excel).

    - B contains code in it's 'BeforeSave' event, which protects the sheets before it is saved.

    - The last command of the macro in A, saves B. So, the 'BeforeSave' event is invoked.

    - However, Excel happily runs the code in the 'BeforeSave' but doesn't actually perform the commands! The result is no protected sheets in B.

    The 'BeforeSave' event code works fine on its own, but doesn't seem to work when invoked by another macro??

    Note: I am using Excel 2000 with all the latest patches installed.

    Please could anyone help.

    Many thanks,
    Jason

    [ This Message was edited by: jasonking on 2002-04-25 08:24 ]

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Massachusetts, USA
    Posts
    255
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am new to macros, and have NO programming experience. Most of the simple macros I use are modified from others, if I can figure out how to modify it. How does one go about saving data from workbook A in workbook B?

    I have to do this in excel (one worksheet only from A into B, but be must be created and saved with the macro).

    I have posted a similar question before on how to do this from excel to word, and was never able to figure that our either...

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •