Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select All Macro

Status
Not open for further replies.

gall3on

Technical User
Mar 15, 2007
35
US
Probably silly question...

I know in Excel, there's a function to Select All using Cntrl+A selecting cells that are not empty.

What is the VB equivalent for this if I try to get this in a Macro? I've tried recording it and looked at the code, but all it does is define a range to select (EG: Range(A1:J10).Select)

I know I can use 'ActiveSheet.Cells.Select' to select all cells in a workbook, but that's not what I really want to do.
 








gall3on,

In the future, if you have VBA questions, please post in Forum707.

BTW, I avoid the Activate & Select methods like the plague!

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Hm, I actually thought I did post it in the VBA forum. Sorry about that!

And thanks for the Cell Select info. I went ahead and changed the VB script altogether because of formatting issues.
 
If you are only interested in the used range of a sheet, then have a look at the UsedRange property.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top