Calls from sheet module to ThisWorkbook module

Q

quartz

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.
 
B

Bob Phillips

Call ThisWorkbook.Workbook_Open

and change the declaration of Workbook_Open to Public.
 
M

Malcolm Makin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top