-
Solved: Code Select Sheet & Range single step
Hi all:
I usually used:
Sheets("name").select
Range("name).select
Now I am trying to do it in a single step:
Sheets("name").range("name").select
But I still missing something to make it work.
Please let me know how to solve it.
Thanks for the help.
Victor
-
[vba]Application.Goto Worksheets("Sheet3").Range("A1:B20"), True[/vba]
Hope this helps,
Mark
-
Hi Victor,
Unless the Selection is the "end result", you should try to avoid selecting cells in macro code. Ranges can be manipulated without selection
eg
[VBA]Worksheets("Sheet3").Range("A1:B20").Interior.ColorIndex = 6
'or
Worksheets("Sheet3").Range("A1:B20").Copy Worksheets("Sheet1").Range("A1")[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules