+ Reply to Thread
Results 1 to 3 of 3

Calls from sheet module to ThisWorkbook module

  1. #1
    quartz
    Guest

    Calls from sheet module to ThisWorkbook module

    I am using Office 2003 on Windows XP.

    I have a "BeforeDoubleClick" event procedure in a Sheet module that needs to
    call a "Workbook_Open" event procedure in the "ThisWorkBook" module. I tried
    the following, but of course this produces an error:

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    Boolean)
    Call Workbook_Open
    End Sub

    Can someone please correct my code above or otherwise describe how I can
    accomplish this?

    Thanks in advance.

  2. #2
    Bob Phillips
    Guest

    Re: Calls from sheet module to ThisWorkbook module

    Call ThisWorkbook.Workbook_Open

    and change the declaration of Workbook_Open to Public.


    --
    HTH

    Bob Phillips

    "quartz" <[email protected]> wrote in message
    news:[email protected]...
    > I am using Office 2003 on Windows XP.
    >
    > I have a "BeforeDoubleClick" event procedure in a Sheet module that needs

    to
    > call a "Workbook_Open" event procedure in the "ThisWorkBook" module. I

    tried
    > the following, but of course this produces an error:
    >
    > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    > Boolean)
    > Call Workbook_Open
    > End Sub
    >
    > Can someone please correct my code above or otherwise describe how I can
    > accomplish this?
    >
    > Thanks in advance.




  3. #3
    Malcolm Makin
    Guest

    RE: Calls from sheet module to ThisWorkbook module

    First, make the Workbook_Open even procedure public by going to where it is
    defined, and changing the "Private Sub" to "Public Sub". Then in your code
    for Worksheet_BeforeDoubleClick, change it to say this:

    Call ThisWorkbook.Workbook_Open


    Regards,

    Malcolm


    "quartz" wrote:

    > I am using Office 2003 on Windows XP.
    >
    > I have a "BeforeDoubleClick" event procedure in a Sheet module that needs to
    > call a "Workbook_Open" event procedure in the "ThisWorkBook" module. I tried
    > the following, but of course this produces an error:
    >
    > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    > Boolean)
    > Call Workbook_Open
    > End Sub
    >
    > Can someone please correct my code above or otherwise describe how I can
    > accomplish this?
    >
    > Thanks in advance.


+ 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