Google Группы больше не поддерживают новые публикации и подписки в сети Usenet. Опубликованный ранее контент останется доступен.

Look after cells changes in another workbook

1 просмотр
Перейти к первому непрочитанному сообщению

Jan Ketil Roed

не прочитано,
29 июл. 1998 г., 03:00:0029.07.1998
Hi all !

From the web site: http://home.gvi.net/~cpearson/excelM.htm I found many
interesting code examples. For instant the following:

A frequent question people have is "Can I run a macro from a cell
function? Something like
=IF(A1>10,Macro1)." The answer is no, you cannot. However, you can use
the worksheet's Change event to do something like this.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target = [A1] Then
If Target.Value > 10 Then
MsgBox "Put Your Code Here"
End If
End If
End Sub

This Worksheet_Change and the Workbook_SheetSelectionChange procedures
are nice tools when you need to look after changes done in a sheet.
However, these codes have to be in the ThisWorkbook environment. Are
there any possibilities to look after changes in cells in one workbook
fra a modul in another workbook ?

It would be nice !


--
Remove x from my e-mail address to reply

Jan Ketil Rød
Department of Geography
NTNU, Trondheim, Norway

Ogilvy, Thomas, W., Mr., ODCSLOG

не прочитано,
29 июл. 1998 г., 03:00:0029.07.1998
Jan,
There is a SheetChange Event associated with the application level
events, but you have to create a class to use Application Level Events.
I believe Chip has a page which covers Application level Events also,
although I have not gone there yet. You also can look at this article
in the KB which describes how to create a class and use and Application
Event. Application Events are global once created - so it could be
created by the "monitoring" workbook.

http://support.microsoft.com/support/kb/articles/q158/2/44.asp
XL97: How to Create Application Level Event Handlers

I recall Steve Bullen described these procedures a couple of months ago,
so you could query DejaNews for that. I believe he also has some
samples of the use of Application level events and code which uses them
at his site: http://www.BMSLtd.co.uk

HTH,
Tom Ogilvy

> ----------
> From: Jan Ketil Roed[SMTP:ja...@svx.ntnu.no]
> Reply To: ja...@svx.ntnu.no
> Posted At: Wednesday, July 29, 1998 9:36 AM
> Posted To: programming
> Conversation: Look after cells changes in another workbook
> Subject: Look after cells changes in another workbook

0 новых сообщений