Drag to Replace in Recorded Macro Returns Invalid Code (110709)
The information in this article applies to:
- Microsoft Excel for Windows 5.0
This article was previously published under Q110709 SUMMARY
In Microsoft Excel version 5.0 for Windows, when you are recording a Visual
Basic subroutine and you drag a cell or range of cells to another cell or
range of cells to replace the original information, the recorded subroutine
may contain syntax errors that prevent it from functioning correctly.
WORKAROUND
To work around this problem, you may need to modify the recorded code. The
modified code should resemble the following:
Sub Macro1()
Range("A1").Select
Selection.Cut (Range("B1"))
Range("B1").Select
End Sub
The third line, which originally contained invalid code, has been replaced
by a line of code that performs the correct action.
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbProgramming KB110709 |
---|
|