View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Assigning worksheet to worksheet variable

Mot sure, but is this not acceptable?

Worksheets("Template").Copy Befo=Worksheets("Template")
Set sSheet = ActiveSheet


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"PO" <po wrote in message ...
Hi!

I'm trying to assign a copied worksheet to a worksheet variable using the
following code:

Dim sSheet As New Excel.Worksheet
Set sSheet = Sheets("Template").Copy(Befo=Sheets("Template") )

This doesn't work.

Any ideas?

TIA
PO