Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Call ThisWorkbook.Workbook_Open
and change the declaration of Workbook_Open to Public. -- HTH Bob Phillips "quartz" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_Open in ThisWorkbook.module | Excel Discussion (Misc queries) | |||
Sheet turns into a "ThisWorkbook" module | Excel Programming | |||
How to use: ThisWorkbook module | Excel Programming | |||
ThisWorkbook module question | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |