Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Named Ranges in VB

Hello,

In WkBk1 I have defined a dynamic range dR which points
to cells in WkBk2. Code in Module1 in WkBk1 I want to
Select dR. so I do the following.

Range(dR).Select


but this line seems to be giving me an error. Can you
actually us a Named Range in VB code? And how would I
accomplish this?

thanks for you help,

Rocky
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using Named Ranges in VB

Hi Rocky

You can't select a range in a other workbook this way.
First you must make the workbook and the sheet active.

You don't have to select the cells if you wnat to do wht you want maybe?
What do you want to do?

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Rocky Bryant" wrote in message ...
Hello,

In WkBk1 I have defined a dynamic range dR which points
to cells in WkBk2. Code in Module1 in WkBk1 I want to
Select dR. so I do the following.

Range(dR).Select


but this line seems to be giving me an error. Can you
actually us a Named Range in VB code? And how would I
accomplish this?

thanks for you help,

Rocky



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Using Named Ranges in VB

And see Chip his answer about the " "


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Rocky

You can't select a range in a other workbook this way.
First you must make the workbook and the sheet active.

You don't have to select the cells if you wnat to do wht you want maybe?
What do you want to do?

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Rocky Bryant" wrote in message ...
Hello,

In WkBk1 I have defined a dynamic range dR which points
to cells in WkBk2. Code in Module1 in WkBk1 I want to
Select dR. so I do the following.

Range(dR).Select


but this line seems to be giving me an error. Can you
actually us a Named Range in VB code? And how would I
accomplish this?

thanks for you help,

Rocky





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Using Named Ranges in VB

Ron de Bruin wrote:
You can't select a range in a other workbook this way.
First you must make the workbook and the sheet active.


Or you can use Application.Goto to change the selection to a cell in another
worksheet and/or workbook:

Application.Goto Workbooks("other").Sheets(1).Range("C150")

--
Regards,

Jake Marx
www.longhead.com


"Rocky Bryant" wrote in message
...
Hello,

In WkBk1 I have defined a dynamic range dR which points
to cells in WkBk2. Code in Module1 in WkBk1 I want to
Select dR. so I do the following.

Range(dR).Select


but this line seems to be giving me an error. Can you
actually us a Named Range in VB code? And how would I
accomplish this?

thanks for you help,

Rocky


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
named ranges? Confused_Euffy[_2_] Excel Worksheet Functions 7 March 17th 08 04:37 PM
named ranges Carol Ann Excel Worksheet Functions 4 February 4th 08 05:20 PM
named ranges Stout Charts and Charting in Excel 2 March 28th 07 02:17 AM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Named Ranges and VBA Add-ins Mark[_19_] Excel Programming 0 September 4th 03 11:37 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"