Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 29th, 2010, 05:47 AM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help! runtime error '1004' working with "Range"

Hi every1,
I'm new to this forum, sorry to start with a question.
I'm having problem with an excel vba code as follows:

Code:
Dim IndexBSC, IndexBTS As Double, IndexBB As Range
For i = 2 To ix Step 6
Set IndexBB = Sheets("BSC KPI").Range(Cells(i, 6), Cells(i + 5, 6))
    IndexBSC = WorksheetFunction.Match(WorksheetFunction.Max(Sheets("BSC KPI").Range(Cells(i, 6), Cells(i + 5, 6))), IndexBB, 0)
    Cells(i, 12).Value = Sheets("BTS KPI").Cells((i - 2) + IndexBSC + 1, 9)
Next i
when I run the code, a runtime error saying "application-defined or object-defined error" appears for the yellow line.

I appreciate if any1 can help.

Thanks in advance





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
Need code corrections "get sub or function not defined" error" bluesboytoo Excel VBA 1 October 22nd, 2009 11:12 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.