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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.End(xlToLeft).Select 1

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
Hi,

Does anybody know the command like the one in parantheses below:

.End(xlToLeft).Select

that will take the focus to the first column on the sheet, for the row?

Thanks

-----
The death of dogma is the birth of reason.
 
Rougy,
Code:
rng.End(xlToLeft).Select
selects column 1 in the Row of rng.

Other parameters for End are

xlToRight
xlUp
xlDown

I would suggest that you attempt to AVOID using Activate and Select. It slows down processing. You can do most of what is needed without Select and Activate...

For instance, to write a value in a cell and make it bold...
Code:
With rng.End(xlToLeft)
   .Value = 5
   .Font.Bold = True
End With
Hope this helps :)

Skip,
Skip@TheOfficeExperts.com
 
Thanks very much.

I'm formatting, though...putting lines around empty cells that aren't supposed to be empty, so that the lab people can better see it and write in the value.

What's happening is that when I use the xlToLeft, the cursor (or focus) is getting hung up on the next filled cell, and not going all the way back to the left side of the row.

-----
The death of dogma is the birth of reason.
 
Actually, what you said made me think of something else that's working even better, so thanks very much.

You're right about the select vs. offset philosophy.

I appreciate your help.

-----
The death of dogma is the birth of reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top