LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 65
Default Got a Class, got a wb - now what??

In a previous post (he http://tinyurl.com/26ucf3), Doug Glancy
helped me tremendously. I want to run a series of macros on every new
and opened workbook. Doug gave me instructions on how to set up a
Class module and globally capture the New and Open events.

In the Class module, I have

Public WithEvents App As Application
Private Sub App_WorkbookOpen(ByVal wb As Workbook)
MsgBox "Somewhere, a workbook has opened"
End Sub

so "wb" is the object I want to deal with. That much I have figured
out!

What I don't know is how to use "wb" in another macro to do things to
the workbook. I could just put a whole macro code right there in the
class module. But for some reason I keep thinking that's not how I
should do it. I could be very wrong, but I thought I ought to ask
first. Any help is greatly appreciated.

Ed

 
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
Class programming - how to return chartobject from a class? [email protected] Excel Programming 3 October 11th 06 12:07 PM
Class modules: parametrize class object fields Jean-Pierre Bidon Excel Programming 11 August 31st 06 02:49 PM
using class module tom taol Excel Programming 1 August 16th 06 05:12 PM
Class within a class Josh Rolfe Excel Programming 7 January 29th 06 07:17 PM
RaiseEvent from a class contained in a 2nd class collection? Andrew[_16_] Excel Programming 2 January 6th 04 04:22 PM


All times are GMT +1. The time now is 02:18 PM.

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"