Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Bug in Excel 2000? (CurrentRegion property triggers events)

Hi,

I tested the following macro in Excel 97 and Excel 2000, and got the
similar result. (perhaps these properties use the same function
(SELECT.SPECIAL in excel4) internally)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Target.Address
End Sub

Sub test()
Dim R As Range
Range("A1").Select
Range("B1") = 1
Range("B2") = "=B1"
Range("A2:A3").FormulaArray = "=1"
Set R = Range("A1").CurrentRegion '2 times
Set R = Range("A2").CurrentArray '2 times
Set R = Range("A1").SpecialCells(xlCellTypeFormulas) '1 time
Set R = Range("A1").SpecialCells(xlCellTypeConstants) '1 time
Set R = Range("A1").SpecialCells(xlCellTypeBlanks) '1 time
Rows(2).Hidden = True
Set R = Range("A1").SpecialCells(xlCellTypeVisible) '1 time
Rows(2).Hidden = False
End Sub

BTW, clicking row and column headings (1, 2, 3... , A, B, C...) also fire
the selection change event.

--
HTH,

okaizawa
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
ActiveCell.CurrentRegion property Microsoft Forum Excel Programming 4 January 11th 05 02:43 PM
Using XP Events with Excel 2000 Users Tod Excel Programming 1 April 5th 04 08:09 PM
How-To - Forwarding Excel 2000 events to .Net application Joel Foner Excel Programming 0 January 28th 04 11:34 PM
Triggers events Bourbon[_19_] Excel Programming 2 January 23rd 04 08:02 PM
.CurrentRegion in Excel functions Tim Lund Excel Programming 1 December 18th 03 03:47 PM


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