Yes, a worksheet needs to be active to select a cell,
otherwise why select the cell?
In code one almost never needs to select a cell as these
are objects that can quite easily be handled in code. Why
would you need to select that cell...the procedure
doesn't use it
With StreetBO
.Range("AP1").Value = "Backouts"
.Range("AP1").Value = .Range("b1").Value
.Columns.AutoFit
End With
Patrick Molloy
Microsoft Excel MVP
-----Original Message-----
Now I've got a little more experience I've been
revisiting some of the
code I've previously written to try and remove as many
of the 'Select'
commands as possible. However, can somebody advise why
the bottom
select statement here does not work? Do I really need to
select the
worksheet first before selecting the cell?
Oh, 'StreetBo' is a declared worksheet.
Thanks,
Adrian
With StreetBO
.Range("AP1").Value = "Backouts"
.Range("b1").Copy
.Range("AP1").pastespecial Paste:=xlFormats,
Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
.Columns.AutoFit
.Range("a2").Select
End With
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
.