LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Blue Hornet
 
Posts: n/a
Default

Bob,

I was hoping you guys could tell me "why?"

Here's the code that's failing:
MyPctOverall = Sheets("Data Sheet").Range("PctOverall").Value

also attempted in Alan's suggested syntax as:
MyPctOverall = Sheet5.Range("PctOverall").Value
and as
MyPctOverall = Sheet5.Range([PctOverall]).Value

(This is a simplified form of what I'm attempting, but this exact
syntax fails, and I don't know why.)

All times I get the incredibly helpful "Run-time error 1004": Method
'Range' of object '_Worksheet' failed. But PctOverall IS a named range
in Data Sheet / Sheet5, so I don't know what the problem is. I can
reference PctOverall on the sheet itself with no errors.

I'm not new to this stuff, and I'm sure I've done it before in exactly
the way you suggest, Bob, but I don't get this. Why is it not working
here?

Chris

 
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
Macro / Compile Error / Duplicate Declaration carl Excel Worksheet Functions 1 June 29th 05 08:55 PM
Macro to copy range from Excel files in folder nc Excel Discussion (Misc queries) 1 June 15th 05 11:11 AM
Is it possible to set a variable range in a macro? Mary About this forum 0 June 12th 05 06:26 PM
Macro - define cell range for a sum function Fad Excel Discussion (Misc queries) 2 June 6th 05 12:40 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM


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