Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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/ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Simple IF problem | Excel Discussion (Misc queries) | |||
Simple problem | New Users to Excel | |||
another simple problem... | Excel Worksheet Functions | |||
Hopefully simple Select Case error | Excel Programming |