![]() |
#1
|
|||
|
|||
![]()
I have written following code to select some nonadjacent difined names plus a user selected range at once (see the Excel attachment. It give error at “Range("""" & Range("range" & i).Address(0, 0) & "," & rng0.Address(0, 0) & """").Select” line. Can you give me some guides on this issue?
Sub selectnonadjacentdinfinedname() Dim i As Integer Dim rng As Range Dim rng0 As Range Set rng = Selection Set rng0 = Range("range1") For i = 2 To 100 Range("""" & Range("range" & i).Address(0, 0) & "," & rng0.Address(0, 0) & """").Select Set rng0 = Selection Next i Range(rng, rng0).Select End Sub |
Tags |
defined name, select |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Firebody | Word | 8 | 03-06-2022 08:22 AM |
Select entire text and then de-select certain Headings? | tq94 | Word | 3 | 02-26-2022 03:47 AM |
Address sheet - I have an address sheet, I want to create and add names from a database of names. | moscowamerican | Mail Merge | 1 | 09-12-2020 07:31 AM |
![]() |
bob999999 | Excel | 1 | 04-28-2013 11:21 AM |
How to enter names in Resource Pool/names | pstein | Project | 1 | 03-26-2012 07:37 AM |