简体   繁体   中英

vba to select a range that is written in a cell

I have made a formula to updates the range I need, so for instance cell A1 will say A1:B9 (always changing when new data is downloaded).

I need to know how to get my VBA to look at cell A1 and use that as the range, eg

ActiveSheet.Range ("a1").select 

to show a range of A1:B9 and not just a1 as a range.

Is this possible??

Like this:

Dim rng as Range
With ActiveSheet
    Set rng = .Range(.Range("A1").Value)
End With

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM