G'day from Oz. The following macro works perfectly when inserting a
new line(s) into an established spreadsheet. However, when I send the
spreadsheet to our Hong Kong or Taiwan branch, the macro fails "Error
Code 13" with the asterisked line highlighted in yellow. Is this a
problem with Chinese Windows incompatibility?
TIA for your help, Dave
Colon = InStr(ActiveWindow.RangeSelection.Address, ":")
If Colon = 0 Then
MsgBox "Please select Rows to be inserted"
Exit Sub
End If
FirstRow = Left(ActiveWindow.RangeSelection.Address, Colon - 1)
LastRow = Mid(ActiveWindow.RangeSelection.Address, Colon + 1)
MyCheck1 = IsNumeric(Mid(FirstRow, 2, 1)) 'Allows for $ lead
character
If MyCheck1 = False Then
MsgBox "Please select Rows to be inserted"
Exit Sub
End If
Rows(FirstRow & ":" & LastRow).Select '***********
Selection.Copy
Rows(LastRow + 1 & ":" & LastRow + 1).Select
Selection.Insert Shift:=xlDown
Range("A" & FirstRow & ":D" & LastRow).ClearContents
Bookmarks