this works perfect with one workbook open
but when i open another excel file with inside this code'If (valueShare1 <> 0) Then
' Worksheets("daily").Range(valueShare1 ).End(xlUp).Offset(1, 0).Value = valueShare1
'End If
i got an error...what could it be the reason?'If (valueShare2 <> 0) Then
' Worksheets("daily").Range(valueShare2 ).End(xlUp).Offset(1, 0).Value = valueShare2
'End If