+ Reply to Thread
Results 1 to 2 of 2

Sheet activate method in beforesave event

Hybrid View

  1. #1
    bdg
    Guest

    Sheet activate method in beforesave event

    Hi

    I would like to know why activate method in beforesave event does not
    work. Could you help me?
    (If you know, please let me know url of MSDN page explaining this
    restriction.)

    -----------ThisWorkbook Module--------------
    Sub test()
    ActiveWorkbook.Save
    End Sub
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
    Cancel As Boolean)
    Sheets("sheet2").Activate
    End Sub
    ----------------------------------------------------

    Case 1 When save by file menu or Ctrl+s
    "Sheets("sheet2").Activate" will work.

    Case 2 When run test procedure
    "Sheets("sheet2").Activate" will not work.

    Thanks to all,
    bdg


  2. #2
    bdg
    Guest

    Re: Sheet activate method in beforesave event

    I forgot to write.
    Both case 1 and 2, sheet1 is active at first.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1