LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Excel200: Strange behaviour for Name when referred from VBA

Hi

In my VBA I rever to various names (the ones returning a value) in my
workbook, like:
Var1=[Name1]
It works nicely, except when the name definition contains function ROW()
(maybe there are other behaving similarily - I myself suspect COLUMN()).

The problematic name is something like:
HeaderCnt=ROW(SheetName!$A$2)
(It's needed to adjust automatically formulas and procedures, when some rows
are added to/removed from table header)
VarHeaderCnt=[HeaderCnt]
returns an 1-dimension object instead of value. To get the value, I have to
use the code:
VarHeaderCnt=[HeaderCnt]
VarHeaderCnt=VarHeaderCnt(1)

(NB! [HeaderCnt](1) doesn't work - it returns an error 'Wrong number of
arguments or invalid property assignment'.)

Can someone explain me this? Thanks in advance!

--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


 
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
Shortcut key strange behaviour BB programmer Excel Worksheet Functions 1 October 12th 06 12:53 AM
Strange if(***) behaviour? Excel 2003 - SPB Excel Discussion (Misc queries) 6 August 6th 06 05:34 PM
Strange behaviour Edgar Thoemmes Excel Worksheet Functions 1 February 8th 05 03:20 PM
Strange behaviour in VBA Help Michael Singmin Excel Programming 4 June 4th 04 07:06 PM
strange behaviour Patrick Molloy Excel Programming 0 September 4th 03 07:51 AM


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