View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BeSmart BeSmart is offline
external usenet poster
 
Posts: 102
Default activesheet error

Hi
I've done something wrong here and I can't work out what it is...
Error msg: "Compile Error: With object must be user-defined type, object,
or Variant"

Sub copylplan()
Dim mySheet As String

mySheet = ActiveSheet

With mySheet
.Copy After:=Sheets(Sheets.Count)
End With

With mySheet
.Name = "Extract Plan"
End With
End Sub
--
Thank for your help
BeSmart