fabriciofcmiranda
Board Regular
- Joined
- Jun 27, 2006
- Messages
- 62
Does anyone know why this code isn't working?
The code is choking on "Range("report_condigoentrada").Select". I'd appreciate if someone could help me with this one.
Code:
Sub InsertRowNumber()
Dim rng As Range
On Error Resume Next
Set rng = Application.InputBox(prompt:="Select the code of the invoice.", _
Title:="Code", Default:=Selection.Address, Type:=8)
On Error GoTo 0
If Not rng Is Nothing Then
If Not rng.Address = ActiveCell.Address Then rng.Copy
Else
Exit Sub
End If
Sheets("Report").Select
Range("report_condigoentrada").Select
ActiveSheet.Paste
Selection.EntireRow.Hidden = False
Application.CutCopyMode = False
Range("report_inicio").Select
End Sub
The code is choking on "Range("report_condigoentrada").Select". I'd appreciate if someone could help me with this one.