Advertisement

04.16.2008 at 01:39PM PDT, ID: 23328824
[x]
Attachment Details

Macro Help.

Asked by onaled777 in Microsoft Excel Spreadsheet Software

Tags: Microsoft, Excel, 2003

I have a macro that is now giving me a (["Runtime error '1004'"] Application-defined or object defined error. If anyone could shead some light as to why I am now getting this error I would be very greatful Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
Sub test()
Dim aSources() As String
Dim aDestinations() As String
Dim iSource, iDestination As Integer
 
aSources = Split("H6,H7,H8,H9,H10,H11", ",")
aDestinations = Split("C20,C21,C22,", ",")
 
iDestination = LBound(aDestinations)
For iSource = LBound(aSources) To UBound(aSources)
    If Sheets(2).Range(aSources(iSource)).Value <> 0 Then
        Sheets(4).Range(aDestinations(iDestination)).Value = Sheets(2).Range(aSources(iSource)).Value
        iDestination = 1 + iDestination
    End If
Next iSource
 
While iDestination <= UBound(aDestinations)
    Sheets(4).Range(aDestinations(iDestination)).Value = ""
    iDestination = 1 + iDestination
Wend
End Sub
[+][-]04.16.2008 at 01:44PM PDT, ID: 21371788

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.16.2008 at 01:49PM PDT, ID: 21371826

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.16.2008 at 01:50PM PDT, ID: 21371827

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.16.2008 at 02:15PM PDT, ID: 21372027

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.17.2008 at 09:02PM PDT, ID: 21383209

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 12:01AM PDT, ID: 21383754

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.18.2008 at 12:06AM PDT, ID: 21383766

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 03:59AM PDT, ID: 21419239

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 04:24AM PDT, ID: 21419355

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 07:16AM PDT, ID: 21420910

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 08:03AM PDT, ID: 21421455

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 01:34PM PDT, ID: 21425050

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 12:16AM PDT, ID: 21428342

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, Excel, 2003
Sign Up Now!
Solution Provided By: chris_bottomley
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628