Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Worksheet Change event

hi All

Heres the situation
Two workbooks, A and B
Workbook B is not allowed to be coded, so I use a button on Workbook A to
open workbook B (so both A and B are open, but B is active).
However, I'd like to make allow alterations to Workbook B using the
worksheet change event. However, since I can't put code in workbook B , I
was wondering if there was a way I could have a change event for workbook B,
in workbook A?

All help appreciated
Libby
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Worksheet Change event

Libby,

If it is a change in Workbook A that is to trigger a change to Workbok B,
that is no problem.

If you want a change in Workbook B to trigger some code in Workbook A, it
is difficult if Workbook B can't have code, as you don't catch the event
.... unless you use application events in workbook A

For example, in workbook A

'========================================
Insert a class module, rename it to 'clsAppEvents', with this code

Option Explicit

Public WithEvents App As Application


Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

MsgBox Wb.Name

End Sub

'========================================
In ThisWorkbook code module, add this event code

Dim AppClass As New clsAppEvents

Private Sub Workbook_Open()

Set AppClass.App = Application

End Sub



--

HTH

RP

"Libby" wrote in message
...
hi All

Heres the situation
Two workbooks, A and B
Workbook B is not allowed to be coded, so I use a button on Workbook A to
open workbook B (so both A and B are open, but B is active).
However, I'd like to make allow alterations to Workbook B using the
worksheet change event. However, since I can't put code in workbook B , I
was wondering if there was a way I could have a change event for workbook

B,
in workbook A?

All help appreciated
Libby



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Worksheet Change event

Libby,

I think you could use application level events. See this link for a start:

http://www.cpearson.com/excel/AppEvent.htm

hth,

Doug Glancy

"Libby" wrote in message
...
hi All

Heres the situation
Two workbooks, A and B
Workbook B is not allowed to be coded, so I use a button on Workbook A to
open workbook B (so both A and B are open, but B is active).
However, I'd like to make allow alterations to Workbook B using the
worksheet change event. However, since I can't put code in workbook B , I
was wondering if there was a way I could have a change event for workbook

B,
in workbook A?

All help appreciated
Libby



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
Worksheet Change Event DCSwearingen Excel Discussion (Misc queries) 1 October 10th 05 10:25 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Worksheet Change Event nrage21[_57_] Excel Programming 4 August 3rd 04 12:32 AM
worksheet change event gautamvt Excel Programming 1 December 10th 03 05:15 PM
Worksheet Change Event Help Please J P Singh Excel Programming 1 July 16th 03 09:37 AM


All times are GMT +1. The time now is 11:59 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"