Hi, i have this
Now, if i open another excel file I've got an error "run time erro '9' subscript out of range"
the second file has
QUOTE]
If (valueCellMyMacro2<> 0) Then
Worksheets("daily2").Range(colSheet2MyMacro2).End(xlUp).Offset(1, 0).Value = valueCellMyMacro2
End If
[/QUOTE]
where
But do you think that the problem is why i didn't put the Workbook?
whereIf (valueCellMyMacro1<> 0) Then
Worksheets("daily1").Range(colSheet2MyMacro1).End(xlUp).Offset(1, 0).Value = valueCellMyMacro1
End If
that should say that "if the value in 'valueCellMyMacro1' is NOT zero then assign the value 'valueCellMyMacro1 ' to the Sheet 'daily1 with range that goes from the top to the buttom'Dim valueCellMyMacro1 As Range
Set valueCellMyMacro1 = Worksheets("Sheet1").Range("B2")
Now, if i open another excel file I've got an error "run time erro '9' subscript out of range"
the second file has
QUOTE]
If (valueCellMyMacro2<> 0) Then
Worksheets("daily2").Range(colSheet2MyMacro2).End(xlUp).Offset(1, 0).Value = valueCellMyMacro2
End If
[/QUOTE]
where
I will try now to put also the woorkbook, just in case.Dim valueCellMyMacro2 As Range
Set valueCellMyMacro2 = Worksheets("Sheet1").Range("B2")
But do you think that the problem is why i didn't put the Workbook?