设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 460|回复: 0

VBA: Select and Special Select functions

[复制链接]
发表于 2011-9-15 15:27:45 | 显示全部楼层 |阅读模式
Try the code bellow, you can see the different selection pf cells.
  1. Sub SelectAll()
  2.     ActiveSheet.Range("B3").End(xlDown).Select
  3.     'ActiveSheet.Cells.Select  -- This is really select all sheet.
  4.     Range(Range("A1"), ActiveCell.SpecialCells(xlLastCell)).Select
  5.     Range("D7").Select
  6.     Range(Range("D7").End(xlUp), Range("D7").End(xlDown)).Select
  7.     Range(Range("B33").End(xlToLeft).End(xlUp), Range("B33").End(xlDown).End(xlToRight)).Select
  8. End Sub
复制代码



您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2026-2-5 04:38 , Processed in 0.011559 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表