ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range selection (https://www.excelbanter.com/excel-programming/334725-range-selection.html)

Sagaron[_5_]

Range selection
 

Hi
I am struggling with defining a range.
I want to specify the range in the normal excel worksheet and want th
vba code to pick this up.
For eg , range i want to select is a1:a3 on sheet1 which I have type
in say cell b1 in the sheet as "a1:a3"
How do I use vb code to pick up on what I typed in b1 to select a1:a3


Thx
Ra

--
Sagaro
-----------------------------------------------------------------------
Sagaron's Profile: http://www.excelforum.com/member.php...fo&userid=2464
View this thread: http://www.excelforum.com/showthread.php?threadid=38772


Toppers

Range selection
 
Range(range("b1")).select

b1 contains a1:a3 (NO quotes)

"Sagaron" wrote:


Hi
I am struggling with defining a range.
I want to specify the range in the normal excel worksheet and want the
vba code to pick this up.
For eg , range i want to select is a1:a3 on sheet1 which I have typed
in say cell b1 in the sheet as "a1:a3"
How do I use vb code to pick up on what I typed in b1 to select a1:a3.


Thx
Raj


--
Sagaron
------------------------------------------------------------------------
Sagaron's Profile: http://www.excelforum.com/member.php...o&userid=24643
View this thread: http://www.excelforum.com/showthread...hreadid=387724



jindon[_25_]

Range selection
 

try

Code:
--------------------

Sub test()
With Sheets("Sheet1")
.Range(.Range("b1").Value).Select
End With
End Sub
--------------------


--
jindon
------------------------------------------------------------------------
jindon's Profile: http://www.excelforum.com/member.php...o&userid=13135
View this thread: http://www.excelforum.com/showthread...hreadid=387724



All times are GMT +1. The time now is 08:58 AM.

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