Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Unclear Error Message

Hi,
I am trying to set a range variable with a defined range, but I get this
error all the time:
"Run-time error '1004':
Application-defined or object-definned error."

the code is this:
Sub temp()
Dim MyRange As Range

Set MyRange = Names("temp").RefersToRange
..
..
..
End Sub

I can't figure it out. Can you help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Unclear Error Message

Sub temp()
Dim MyRange As Range

Set MyRange = ThisWorkbook.Names("temp").RefersToRange
..
..
..
End Sub

is a possibility.

--
Regards,
Tom Ogilvy


"Yossi" wrote in message
...
Hi,
I am trying to set a range variable with a defined range, but I get this
error all the time:
"Run-time error '1004':
Application-defined or object-definned error."

the code is this:
Sub temp()
Dim MyRange As Range

Set MyRange = Names("temp").RefersToRange
.
.
.
End Sub

I can't figure it out. Can you help?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Unclear Error Message

thanks!

"Tom Ogilvy" wrote:

Sub temp()
Dim MyRange As Range

Set MyRange = ThisWorkbook.Names("temp").RefersToRange
..
..
..
End Sub

is a possibility.

--
Regards,
Tom Ogilvy


"Yossi" wrote in message
...
Hi,
I am trying to set a range variable with a defined range, but I get this
error all the time:
"Run-time error '1004':
Application-defined or object-definned error."

the code is this:
Sub temp()
Dim MyRange As Range

Set MyRange = Names("temp").RefersToRange
.
.
.
End Sub

I can't figure it out. Can you help?




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
VBA Link - Previous post unclear robert morris Excel Discussion (Misc queries) 9 May 1st 08 09:57 PM
How do I unclear the value axis? taneate Charts and Charting in Excel 1 September 26th 06 08:38 AM
Unclear about hot to automate searchs Keith Excel Worksheet Functions 2 January 11th 06 03:35 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


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