ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select range problem (https://www.excelbanter.com/excel-programming/434568-select-range-problem.html)

Kentae

Select range problem
 
Hi
In this example "EndDatabas" Ã*s cell P1120. So I want A1:P1120 to be
selected, but I get A1: Q1120!!

Range("EndDatabas").Select
myRowNr = ActiveCell.Row
myColNr = ActiveCell.Column
Range(Cells(1, 1), Cells(myRowNr, myColNr)).Select
Wat's wrong?
Thanks in advance
//KentÄ

Jacob Skaria

Select range problem
 
Try

Range("A1","EndDatabas").Select

If this post helps click Yes
---------------
Jacob Skaria


"Kentae" wrote:

Hi
In this example "EndDatabas" Ã*s cell P1120. So I want A1:P1120 to be
selected, but I get A1: Q1120!!

Range("EndDatabas").Select
myRowNr = ActiveCell.Row
myColNr = ActiveCell.Column
Range(Cells(1, 1), Cells(myRowNr, myColNr)).Select
Wat's wrong?
Thanks in advance
//KentÄ



All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com