Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Calls from sheet module to ThisWorkbook module

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
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
Workbook_Open in ThisWorkbook.module Bob Barnes Excel Discussion (Misc queries) 1 February 12th 08 07:52 PM
Sheet turns into a "ThisWorkbook" module Rob Excel Programming 3 March 15th 05 01:33 PM
How to use: ThisWorkbook module RichardG Excel Programming 2 October 21st 04 12:44 AM
ThisWorkbook module question Stuart[_5_] Excel Programming 3 July 17th 04 02:32 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 01:48 AM.

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

About Us

"It's about Microsoft Excel"