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: 115
Default ASSIGNING THE VALUE TO A NAMED RANGE GIVING OBJECT DEFINED ERROR

DEAR ALL

I intended to use the result of RCOUNT variable to various other
procedures.

So I have named a cell by name REF_NUMBR.

Flg is the vb code:
Set COL_F = Range("F5.F20")
RCOUNT = Application.CountA(COL_F)
100 Names("REF_NUMBR").Value = RCOUNT

but at line 100 it gives error saying application-defined or object-
defined error.
Then I made it as activeworkbook.Names("REF_NUMBR").Value = RCOUNT
and it accepts.

Instead of the above if i use Range("REF_NUMBR").Value = RCOUNT
it takes the value.

Earlier i was using activesheet.range("a1").value = RCOUNT and was
referring to this range.

Pls advice how to use the line 100 correctly using the 'NAMES' and
shortest code.

 
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
Application-defined or object-defined error (worksheet, range, sel darxoul Excel Programming 4 August 2nd 06 01:59 PM
Copying A Range of Cells From one Sheet to Another - Error Application Defined or Object Defined Matt[_39_] Excel Programming 3 July 25th 06 01:13 AM
Dictionary object: Error assigning user defined data type to item Paul Urbanus Excel Programming 2 December 1st 05 04:21 AM
Range - Application Defined or Object Defined Error Dyl Excel Programming 6 October 31st 05 07:57 PM
error: ActiveCell.Offset(0, -1).Select = Application-defined or object-defined error -[::::Shamran::::]- Excel Programming 7 June 7th 05 02:14 PM


All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"