Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

myRange.Calculate returns error in 2003 but not in 2007

Status
Not open for further replies.

Gavona

Technical User
Aug 27, 2002
1,771
0
0
GB
I am puzzled over this error! The line of code is:
If Application.Calculation = xlCalculationManual Then myRange.Calculate

At this point myRange.address = "$F$8:$F$1962"

The error is Runtime error '1004'
Calculate method of Range class failed

Gavin
 
hi,
Code:
If Application.Calculation = xlCalculationManual Then [myRange].Calculate
or
Code:
If Application.Calculation = xlCalculationManual Then [\Range("myRange").Calculate


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
That is assuming that MyRange is defined on the sheet.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
[blush]I should have googled first. I rather suspect that this resolves my issue:
kb292476
kb292476 said:
The Range.Calculate method does not function when both the Manual calculation option and the Iteration check box are selected.
I can't believe I haven't come across the issue before but it seems quite likely that that will resolve the issue.

Skip: myRange is a variable and the vba works in 2007 so I don't think that is the issue.

Sasdly I can't test until next Tuesday.

Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top