Thread: VBA Problems
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Elise148 Elise148 is offline
external usenet poster
 
Posts: 43
Default VBA Problems

I'm trying to copy a worksheet and move and rename it to the end of the
workbook. This is the VBA code I have...

Sheets("201").Select
N = Sheets.Count
Sheets("201").Copy After:=Sheets(N)
ActiveSheet.Name = InputBox("Enter the number of the new distributor.")

It works for several times, but then an error comes up and it highlights the
third row. I don't understand! Any ideas?!?!?