Run-time error after calling a procedure
Here is a segment of my code:
InsertSpectrum
ActiveSheet.Range(Cells(12 + j, 22), Cells(12 + j, 35)).Value = _
ActiveSheet.Range("V10:AI10").Value
where InsertSpectrum is another procedure in the same project.
The 2nd line does not execute; instead, I get an error "Run-time error
'1004': Method 'Cells' of object '_Global' failed". If I remove the call to
InsertSpectrum, the next line executes properly.
What can I check to correct the problem, so that the second line will run
after the procedure call?
|